Chapter 3. SQL Basics
You might have noticed that I barely mentioned SQL in the preceding chapter. Remember this equation:
SQL ≠ Relational model
SQL is based on the relational model but doesn't implement it faithfully. One departure from the model is that in SQL, primary keys are optional rather than mandatory. Consequently, tables without keys will accept duplicate rows, rendering some data inaccessible. A complete review of the many disparities is beyond the scope of this book (see the “Learning Database Design” sidebar in “Tables, Columns, and Rows” in Chapter 2). The upshot of these discrepancies is that DBMS users, and not the DBMS itself, bear the responsibility for enforcing a relational structure. Another result is that the Model and
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access