Skip to content

Commit 83fe9bf

Browse files
committed
Docs: Enhance initial-setup README prioritising docker and refining PGAdmin steps
Rebased branch onto current `main` ; some earlier overlapping edits were already incorporated upstream. This commit: - Moves Docker setup to Option A so new developers see the simplest path first. - Adds a brief note explaining what the `.env` file stores. - Expands PGAdmin instructions with step-by-step UI guidance.
1 parent db68ad8 commit 83fe9bf

File tree

1 file changed

+36
-28
lines changed
  • bootcamp/materials/1-dimensional-data-modeling

1 file changed

+36
-28
lines changed

bootcamp/materials/1-dimensional-data-modeling/README.md

Lines changed: 36 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -40,27 +40,7 @@ cd data-engineer-handbook/bootcamp/materials/1-dimensional-data-modeling
4040

4141
### Step 2️⃣: Start PostgreSQL
4242

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)
6444

6545
1. Install [Docker Desktop](https://www.docker.com/products/docker-desktop)
6646
2. Copy the env template:
@@ -69,6 +49,8 @@ pg_restore -U [username] -d [db_name] -h [host] -p [port] data.dump
6949
cp example.env .env
7050
```
7151

52+
> The `.env` file stores credentials used by PostgreSQL and PGAdmin
53+
7254
3. Start PostgreSQL & PGAdmin in containers:
7355

7456
```bash
@@ -93,6 +75,26 @@ docker compose stop
9375

9476
---
9577

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+
9698
### Step 3️⃣: Connect to PostgreSQL
9799

98100
Choose any GUI tool you like. Here’s how:
@@ -102,14 +104,20 @@ Choose any GUI tool you like. Here’s how:
102104
1. Go to [http://localhost:5050](http://localhost:5050)
103105
2. Log in using the credentials from your `.env` file
104106
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
112117
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
113121

114122
---
115123

0 commit comments

Comments
 (0)