@@ -61,9 +61,9 @@ completion date: 2021-10-16
61
61
+ [ LIMIT and OFFSET] ( #limit-and-offset )
62
62
63
63
[ 7. Unions, Intersect, Except] ( #7-union-union-all-intersect-intersect-all-except-except-all )
64
- + [ Union ] ( #union )
65
- + [ Intersect ] ( #intersect )
66
- + [ Except ] ( #except )
64
+ + [ UNION ] ( #union )
65
+ + [ INTERSECT ] ( #intersect )
66
+ + [ EXCEPT ] ( #except )
67
67
68
68
[ 8. Subqueries] ( #8-subqueries )
69
69
+ [ Subqueries in SELECT] ( #subqueries-in-select )
@@ -75,7 +75,7 @@ completion date: 2021-10-16
75
75
+ [ Correlated Subqueries] ( #correlated-subqueries )
76
76
+ [ Select without a FROM] ( #select-without-a-from )
77
77
78
- [ 9. Destinct ] ( #9-destinct )
78
+ [ 9. DESTINCT ] ( #9-destinct )
79
79
80
80
[ 10. Utility Operators, Keywords, and Functions] ( #10-utility-operators-keywords-and-functions )
81
81
+ [ GREATEST] ( #greatest )
@@ -92,9 +92,11 @@ completion date: 2021-10-16
92
92
+ [ multi-column check] ( #multi-column-check )
93
93
+ [ remove a constraint] ( #remove-a-constraint )
94
94
95
-
96
95
---
97
- [ 12. PostgreSQL] ( #12-postgresql )
96
+ [ 12. Database Design] ( #12-database-design )
97
+ + [ Schema designers] ( #schema-designers )
98
+
99
+ [ 13. PostgreSQL] ( #13-postgresql )
98
100
+ [ Installation] ( #installation )
99
101
100
102
@@ -1310,11 +1312,52 @@ DROP CONSTRAINT products_name_key;
1310
1312
to visually check that this updated, you have to refresh:
1311
1313
right-click products table -> refresh
1312
1314
1315
+ ---
1316
+ ###### <div style =" text-align :right " >[ table of contents] ( #table-of-contents ) </div >
1317
+
1318
+ ## 12. Database design
1319
+
1320
+ ### schema designers
1321
+ help you structure database tables and columns, data types
1322
+ shows the relationship between tables.
1323
+
1324
+ ##### code-based
1325
+ benefits include allowing you to commit diagram code to repository
1326
+
1327
+ * [ dbdiagram.io] ( http://dbdiagram.io )
1328
+
1329
+ ``` sample code
1330
+
1331
+ Table users{
1332
+ id integer [pk, increment]
1333
+ username varchar
1334
+ }
1335
+
1336
+ Table comments {
1337
+ id integer [pk, increment]
1338
+ contents varchar
1339
+ user_id int [ref: > users.id]
1340
+ post_id int [ref: > posts.id]
1341
+ }
1342
+
1343
+ Table post {
1344
+ id integer [pk, increment]
1345
+ title varchar
1346
+ }
1347
+
1348
+ ```
1349
+
1350
+ * [ quickdatabasediagrams.com] ( quickdatabasediagrams.com )
1351
+
1352
+ ##### diagram based
1353
+ * [ ondras.zarovi.cz/sql/demo] ( ondras.zarovi.cz/sql/demo )
1354
+ * [ drawsql.app] ( http://drawsql.app )
1355
+ * [ sqldbm.com] ( sqldbm.com )
1313
1356
1314
1357
---
1315
1358
###### <div style =" text-align :right " >[ table of contents] ( #table-of-contents ) </div >
1316
1359
1317
- ## 12 . PostgreSQL
1360
+ ## 13 . PostgreSQL
1318
1361
* Installing postgreSQL installs pgadmin.
1319
1362
* Pgadmin is a web-based tool to manage and inspect a postgres database.
1320
1363
* One postgres server can have multiple databases.
0 commit comments