@@ -40,27 +40,7 @@ cd data-engineer-handbook/bootcamp/materials/1-dimensional-data-modeling
40
40
41
41
### Step 2️⃣: Start PostgreSQL
42
42
43
- #### 🧩 Option A: Local Installation (Manual Setup)
44
-
45
- 1 . Install PostgreSQL
46
- - [ Mac – use Homebrew] ( https://brew.sh/ )
47
- - [ Windows – official installer] ( https://www.postgresql.org/download/ )
48
-
49
- 2 . Restore the sample database:
50
-
51
- ``` bash
52
- pg_restore -c --if-exists -U < your-username> -d postgres data.dump
53
- ```
54
-
55
- If that fails, try:
56
-
57
- ``` bash
58
- pg_restore -U [username] -d [db_name] -h [host] -p [port] data.dump
59
- ```
60
-
61
- ---
62
-
63
- #### 🐳 Option B: Docker (Simplest & Preferred)
43
+ #### 🐳 Option A: Docker (Simplest & Preferred)
64
44
65
45
1 . Install [ Docker Desktop] ( https://www.docker.com/products/docker-desktop )
66
46
2 . Copy the env template:
@@ -69,6 +49,8 @@ pg_restore -U [username] -d [db_name] -h [host] -p [port] data.dump
69
49
cp example.env .env
70
50
```
71
51
52
+ > The ` .env ` file stores credentials used by PostgreSQL and PGAdmin
53
+
72
54
3 . Start PostgreSQL & PGAdmin in containers:
73
55
74
56
``` bash
@@ -93,6 +75,26 @@ docker compose stop
93
75
94
76
---
95
77
78
+ #### 🧩 Option B: Local Installation (Manual Setup)
79
+
80
+ 1 . Install PostgreSQL
81
+ - [ Mac – use Homebrew] ( https://brew.sh/ )
82
+ - [ Windows – official installer] ( https://www.postgresql.org/download/ )
83
+
84
+ 2 . Restore the sample database:
85
+
86
+ ``` bash
87
+ pg_restore -c --if-exists -U < your-username> -d postgres data.dump
88
+ ```
89
+
90
+ If that fails, try:
91
+
92
+ ``` bash
93
+ pg_restore -U [username] -d [db_name] -h [host] -p [port] data.dump
94
+ ```
95
+
96
+ ---
97
+
96
98
### Step 3️⃣: Connect to PostgreSQL
97
99
98
100
Choose any GUI tool you like. Here’s how:
@@ -102,14 +104,20 @@ Choose any GUI tool you like. Here’s how:
102
104
1 . Go to [ http://localhost:5050 ] ( http://localhost:5050 )
103
105
2 . Log in using the credentials from your ` .env ` file
104
106
3 . Create a new server:
105
- - ** Name** : Name of your choice
106
- - ** Host** : ` my-postgres-container `
107
- - ** Port** : ` 5432 `
108
- - ** Database** : ` postgres `
109
- - ** Username** : ` postgres `
110
- - ** Password** : ` postgres `
111
- - ✅ Save Password
107
+ 1. `Dashboard` ➜ `Quick Links` ➜ `Add New Server`
108
+ 2. Under the `General` tab: give it a friendly `Name`, e.g. `Data-Engineer-Handbook-DB`
109
+ 3. `Connection` tab: Copy in credentials from `.env`, where the defaults are:
110
+ - **Name**: Name of your choice
111
+ - **Host**: `my-postgres-container`
112
+ - **Port**: `5432`
113
+ - **Database**: `postgres`
114
+ - **Username**: `postgres`
115
+ - **Password**: `postgres`
116
+ - ✅ Save Password
112
117
4 . Click ** Save** — and you’re connected!
118
+ 5 . Expand ` Servers ` › * ` your-server ` * › ` Databases ` › ` postgres `
119
+ - The database must be highlighted to be able to open the `Query Tool`
120
+ - Further expanding `postgres` › `Schemas` › `public` › `Tables` should show the expected content
113
121
114
122
---
115
123
0 commit comments