← All system designs

Foundations

What a database is, what a DBMS adds over a pile of files, the three-schema architecture, and the family of database systems.

4 items 4 Foundational

A database is structured persistent state with concurrent access; a DBMS is the system that makes that practical to build apps against. The Foundations topic answers the questions an interviewer leads with: 'why do we have databases?', 'what does ACID actually mean?', 'how is a relational database different from a key-value store?'. Get these clear and the rest of the workbook becomes detail.

The move from file-based systems to databases is the original case study — once two programs share state, you need a system to manage redundancy, integrity, concurrency, and recovery. Every modern DBMS exists because file-based systems can't do those four jobs together.

Key concepts

  • Database = structured, queryable, shared, persistent state
  • DBMS = the system that gives those four properties guarantees
  • Three-schema architecture decouples conceptual / logical / physical layers
  • Data independence is the property that schema changes at one level don't cascade
  • Different families (relational, document, key-value, graph, columnar) optimise for different workloads

Reference template

// Picking a database family
1. What's the access pattern?    (point lookups? range scans? joins? graph traversal?)
2. What's the consistency need?  (strong? eventual? per-key?)
3. What's the scale axis?        (write throughput? read latency? data volume?)
4. What's the schema flexibility? (rigid? evolving? heterogeneous?)
5. What's the operational cost?  (managed service? self-host? team skills?)

Adapt to your problem; the structure is the load-bearing part.

Common pitfalls

  • Reaching for NoSQL because 'it's web-scale' — the relational model is almost always the right starting point
  • Conflating database (the data) with DBMS (the system) — interviewers will pick this up
  • Treating ACID as binary — every property has gradations in production
  • Picking a system before understanding the access pattern — the wrong choice is expensive to undo

Related topics

Items (4)

  • What Is a Database?

    A shared, structured, queryable, persistent collection of data — and the DBMS that gives those four properties teeth.

    Concept Foundational
  • Why Not Files? The Case for a DBMS

    The limits of file-based systems that drove the move to databases — redundancy, integrity, concurrency, recovery.

    Concept Foundational
  • DBMS Architecture — The Three-Schema Model

    Conceptual, logical, and physical schemas; data independence; how a schema change at one level shouldn't break the others.

    Concept Foundational
  • Classification of Database Systems

    Relational vs document vs key-value vs graph vs columnar vs time-series. What each is good at and where the boundaries blur.

    Concept Foundational
Search ESC

Keyboard shortcuts

Shortcuts are disabled while typing in inputs.