|
|
|
|
|
by 38911BBF
2145 days ago
|
|
IMHO lots of teachers have an absolute horrible understanding of relational databases and SQL. Myself included, until I started working at large financial institutions and read every book by Joe Celko I could lay my hands on. E.g. using NATURAL JOINs covers about 1/3 of the use cases where students or apprentices are usually fiddling with INNER JOINs or joining relations using WHERE TableA.ID = TableB.ID, and it's syntax is much simpler. With a well thought out schema, I personally find that NATURAL JOINs covers about 80% of my needs in that respect, and being unable to NATURAL JOIN tables is beginning to indicate well, not a "code smell" but what I would call a "schema smell". I fully agree. Joining relations in a relational databases should absolutely be simple - and it absolutely can be: SELECT col_x, col_y
FROM TableA
NATURAL JOIN TableB
|
|