Some sql / nosql

Example Databases and Tables

  • https://memto.github.io/linux/program/tooltips/2021/08/13/example-databases-and-tables-sqlfiddle/

  • Auto Shop Database:

    • http://sqlfiddle.com/#!9/ff1d04
    • https://stackoverflow.com/a/46380990
-- Relationships between tables
-- Each Department may have 0 or more Employees
-- Each Employee may have 0 or 1 Manager
-- Each Customer may have 0 or more Cars
  • Library Database:
    • http://sqlfiddle.com/#!9/ba7ded
    • https://stackoverflow.com/a/46381062
-- Relationships between tables
-- Each author can have 1 or more books
-- Each book can have 1 or more authors
  • Countries Table:
    • http://sqlfiddle.com/#!9/c7b3c2
    • https://stackoverflow.com/a/46381130

SQL Joins: Difference Between Inner/Left/Right/Outer Joins

  • https://joins.spathon.com/