You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/30-schema-in-postgresql.mdx
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,9 @@ import Screenshot from "@site/src/components/Screenshot";
2
2
3
3
# 📘 Schema in PostgreSQL
4
4
5
-
The following screenshot shows an entity-relationship diagram of the relational database we wish to migrate. This is a library management app that stores information about books, where a book can have many authors, an author can write many books, and users can borrow books and leave reviews.
5
+
The following screenshot shows an entity-relationship diagram of the relational database we wish to migrate. This is a library management app that stores information about books, where a book can have many authors, an author can write many books, and users can borrow books and leave reviews. You can have many copies of the same book (issue_details) and those are what users borrow and return. A library user can have many addresses.
6
6
7
7
This is the sample schema we use during our [Developer Days's Intro Lab](https://mongodb-developer.github.io/intro-lab/docs/importing-data/intro).
8
8
9
-
<Screenshoturl="https://www.mongodb.com/products/tools/relational-migrator"src="img/30-image-001.png"alt="Screenshot of the connect modal" />
9
+
[](/img/30-image-001.png)
Copy file name to clipboardExpand all lines: docs/50-create-project/50-create-new-project.mdx
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,11 +9,11 @@ Ensure Relational Migrator is installed and running (usually at http://127.0.0.1
9
9
## Click on New Project
10
10
11
11
12
-
<Screenshoturl="https://www.mongodb.com/products/tools/relational-migrator"src="img/50-image-001.png"alt="Screenshot of the connect modal" />
12
+
<Screenshoturl="http://127.0.0.1:8278"src="img/50-image-001.png"alt="Screenshot of the connect modal" />
13
13
14
14
## Select one of the three options
15
-
- Click **Connect to live database** if you are running the origin DB in the cloud, Docker or using your own hardware.
15
+
- Click **Connect database** if you are running the origin DB in the cloud, Docker or using your own hardware.
16
16
- Click **Load schema from a file** if you don't have access to a source database and just want to work with the schema (you won't have any data to import though).
17
17
- Click **Use a sample schema** to play around with a test schema, without any data. This does not require connecting to a real DB. We won't use this one in this Lab.
18
18
19
-
<Screenshoturl="https://www.mongodb.com/products/tools/relational-migrator"src="img/50-image-002.png"alt="Screenshot of the connect modal" />
19
+
<Screenshoturl="http://127.0.0.1:8278"src="img/50-image-002.png"alt="Screenshot of the connect modal" />
Copy file name to clipboardExpand all lines: docs/50-create-project/60-connect-database.mdx
+16-6Lines changed: 16 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,19 +2,29 @@ import Screenshot from "@site/src/components/Screenshot";
2
2
3
3
# 👐 Connect to the Database
4
4
5
+
## Add a new connection
6
+
7
+
We can store the credentials of our database so in the next session we can connect quickly. In this case, we'll create a new connection selecting "Add a new connection".
8
+
5
9
## Select PostgreSQL as Database Type
6
10
11
+
Then we'll select PostgreSQL as our source database.
12
+
7
13
<Screenshoturl="https://www.mongodb.com/products/tools/relational-migrator"src="img/60-image-000.png"alt="Selecting PostgreSQL as Database" />
8
14
9
15
## Enter connection details
10
16
11
17
Enter the details for the PostgreSQL database you will be migrating from.
12
18
13
-
- If your instructors have configured a server for you to use, ask them for the host name, username and password. It's important to click on the `SSL` tab and active SSL.
14
-
- If you followed the steps to configure PostgreSQL in a docker container, the hostname will be `localhost`, username `postgres`and password`postgres`.
15
-
16
-
Click `Test Connection` to ensure your details are correct.
17
-
18
-
Click `Connect` to proceed to the next step.
19
+
- It's important to click on the `SSL` tab and activate SSL (SSL mode Prefer is fine), otherwise we won't be able to connect to cloud hosted databases.
20
+
- If your instructors have configured a server for you to use, ask them for the host name, username and password.
21
+
- Database name should be "library"
22
+
-Click `Test Connection` to ensure your details are correct.
23
+
- Click `Connect` to proceed to the next step.
24
+
- You can give your connection a name and a tag to make it simpler to remember later
19
25
20
26
<Screenshoturl="https://www.mongodb.com/products/tools/relational-migrator"src="img/60-image-001.png"alt="Screenshot of the connect modal" />
27
+
28
+
:::info
29
+
🦸♂️ If you have followed the steps to configure PostgreSQL in a docker container, the hostname will be `localhost`, username `postgres` and password `postgres`.
Copy file name to clipboardExpand all lines: docs/50-create-project/80-define-initial-schema.mdx
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,7 @@ import Screenshot from "@site/src/components/Screenshot";
2
2
3
3
# 👐 Define the Initial Schema
4
4
5
-
Relational Migrator gives you three options on how your MongoDB schema should be created. Regardless of which option you choose,
6
-
you can manually modify your schema later.
5
+
Relational Migrator gives you three options on how your MongoDB schema should be created. Regardless of which option you choose, you can manually modify your schema later.
7
6
8
7
Select `Start with a recommended MongoDB schema`
9
8
@@ -21,4 +20,6 @@ Any tables you did not check will be embedded in other collections.
21
20
22
21
<Screenshoturl="https://www.mongodb.com/products/tools/relational-migrator"src="img/80-image-001.png"alt="Screenshot of the connect modal" />
23
22
23
+
Select the casing you'd like for your collections. Defaults to camelCase.
0 commit comments