Skip to content

Latest commit

 

History

History
37 lines (33 loc) · 1.1 KB

File metadata and controls

37 lines (33 loc) · 1.1 KB

SQL vs NoSQL

DBMS (Database Management System)

  • software layer, or service
  • provides read/write access to databases
    • client/server model
  • centralized database administration (DBA)
    • reliability, availability

Relational (SQL) vs Non-Relational (NoSQL)

  • SQL: structured data, tables, rows, columns
    • MySQL, PostgreSQL, SQLite
  • NoSQL: unstructured data, key-value pairs, documents, graphs
    • MongoDB, CouchDB, Cassandra

Consistency

  • Can delayed transactions leave the DB in an inconsistent state?
  • ACID (relational)
    • atomic: all commits succeed/ fail as one
    • consistent: when transaction completes
    • isolated: transactions run one at a time
    • durable: transaction results are permanent
  • BASE (NoSQL)
    • basically available: appears to function properly
    • soft state: state can change, without input
    • eventually consistent at read time

DB Schema

  • Design of your data
  • how your data is organized
  • types of entities
    • attributes
    • relations
  • derived from Data Model
  • SQL vs NoSQL differences
    • SQL: schema on write
    • NoSQL: schema on read