File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed
module2-database-technologies
r2-introduction-to-relational-databases Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -34,9 +34,9 @@ visualization of the data.
3434
3535** id** |** first\_ name** |** last\_ name** |** registered\_ at**
3636:-----:|:-----:|:-----:|:-----:
37- 1|Ammar|Sammour |2012-01-02
38- 2|Halit|Batur |2012-01-03
39- 3|Shrreya|Bhatachaarya |2012-01-05
37+ 1|Joe|Smith |2012-01-02
38+ 2|Jane|Doe |2012-01-03
39+ 3|Susan|Stone |2012-01-05
4040
4141The ` Order ` table may look something like so:
4242
@@ -53,7 +53,7 @@ called a **foreign key** (or sometimes join key). This column creates a
5353customer the order belongs. This is the core of relational databases: expressing
5454relations between entities.
5555
56- This table says that Ammar has ordered a keyboard, mouse, and cookies. He has
57- three orders, because there are three rows with ` customer_id = 1 ` . Halit has ordered one item: rice (` customer_id = 2 ` ).
56+ This table says that Joe has ordered a keyboard, mouse, and cookies. He has
57+ three orders, because there are three rows with ` customer_id = 1 ` . Jane has ordered one item: rice (` customer_id = 2 ` ).
5858
5959
Original file line number Diff line number Diff line change @@ -29,8 +29,8 @@ manually provide an id or a created timestamp, these are automatically generated
2929by MySQL.
3030
3131``` sql
32- INSERT INTO customer (first_name, last_name) VALUES (' Halit ' , ' Batur ' );
33- INSERT INTO customer (first_name, last_name) VALUES (' Ammar ' , ' Sammour ' );
32+ INSERT INTO customer (first_name, last_name) VALUES (' Jane ' , ' Doe ' );
33+ INSERT INTO customer (first_name, last_name) VALUES (' Joe ' , ' Smith ' );
3434```
3535
3636Now let's ` SELECT ` the data -- that is, let's view the data.
@@ -43,8 +43,8 @@ The `*` symbol tells us to get all columns. You should see something like this:
4343```
4444 id | first_name | last_name | created_at
4545----+------------+-----------+-------------------------------
46- 1 | Halit | Batur | 2021-08-29 03:33:14.559122-07
47- 2 | Ammar | Sammour | 2021-08-29 03:34:08.522222-07
46+ 1 | Jane | Doe | 2021-08-29 03:33:14.559122-07
47+ 2 | Joe | Smith | 2021-08-29 03:34:08.522222-07
4848(1 row)
4949```
5050
You can’t perform that action at this time.
0 commit comments