networking - notes 1 - relational databases (RDBs)

contents

  1. data storage
  2. sql
  3. creating DBs
  4. references

data storage

relational databases - anatomy

anatomy of a table:

aggregation:

queries:

uniqueness and key

joining tables


sql


data types



SQL query



query modifiers



why a DB language?



SQL header problem



exploring query examples



inserting (adding) rows



joining tables



sub-queries



sql views



creating DBs


normalized DB design


  1. every row has the same number of columns
    • the extruding data needs to be spread across two rows with repeating ID keys if it’s of the same type
  2. there is a unique key, and everything in a row says something about that key
    • in any row, the key provides the context which the rest of the row describes
    • primary key in SQL is used as a unique row identifier
  3. facts that don’t relate to the key belong in different tables
    • this helps reduce redundancy
    • and consequently storage space used
    • while providing separate tables with more specific information
  4. tables shouldn’t imply relationships that don’t exist

normalized DB terminology



important DB code paradigm:



references


created: 05 Jul 2019
today's track: The Girl (SvanteG Remix) by Hellberg ft. Cozi Zuehlsdorff