Skip to content
Projects

djeada/Databases-Notes

View on GitHub

djeada/Databases-Notes has 33 GitHub stars and 11 forks. Star changes are not measured yet. Last checked 2026-11-10 01:09 UTC. Last push 2026-11-05.

How these counts are measured

Welcome to my database notes. I’ve put together insights on everything from database types and transactions to indexes, isolation levels, data warehousing, replication, and even the Halloween Problem. These notes are born from my own experiences and challenges, capturing both theory and practical tips in a concise, accessible way.

Measured star growth

in 24h
Collecting history
in 7 days
Collecting history
in 15 days
Collecting history
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

README.md

Original

Database Systems Notes

License: MIT GitHub stars GitHub forks

Practical notes on database design, SQL, transactions, storage, indexing, distributed systems, performance, security, and database operations.

The opening chapters build a bookstore example from tables and relationships to working SQL and checkout transactions. Later chapters explain storage, concurrency, distribution, and operations. Use the glossary when a term is unfamiliar and the review questions to check what you can explain.

Database Systems Notes cover

Contents

Getting started

If you are new to databases, follow this route:

  1. Introduction: read a customer table, distinguish a database from its software, and try a first query.
  2. Data models and design: decide which facts belong together and which rules they must obey.
  3. SQL introduction: create the shared SQLite bookstore. Work through data changes, transactions, joins, aggregates, and window functions. Start each note from a fresh setup unless it explicitly continues an exercise.
  4. ACID: understand why checkout needs more than individually valid statements.
  5. Storage and concurrency: learn how reads, writes, and competing operations work underneath SQL.
  6. Distributed databases and replication: add machines only after understanding the new routing, timing, and failure questions.

Then explore performance, security, engine choices, analytics, and ORMs according to your needs. Use the contents as a reference map; you do not need to read every engine or cloud-service chapter before writing useful SQL.

The introductory exercises use SQLite. Procedure and permission exercises explicitly switch to PostgreSQL; later notes use several named engines. Run code in its stated engine, because syntax and guarantees differ. A code fragment illustrating a concept is not always a complete setup script. Expected failures are marked in the text.

Use the glossary as a reference rather than a prerequisite. For each exercise, predict the result, run it, and explain why those rows appear before moving on.

SQL playgrounds

  • SQLite Online — Run SQLite queries in the browser.
  • SQL Practice — Practice queries with immediate feedback.
  • SQL Forever — Use a lightweight online SQL interpreter.
  • DB Fiddle — Test queries across several database engines.

Sample databases

Notes

Introduction to Databases

Database Design

SQL

ACID Properties and Transactions

Database Storage and Indexing

Distributed Databases

Concurrency Control and Locking

Database Performance and Optimization

Database Replication

NoSQL Databases

  • NoSQL Introduction — Choose models from access patterns rather than the NoSQL label.
  • NoSQL Types — Key-value, document, wide-column, and graph model overview.
  • Querying NoSQL — Compare MongoDB, Redis, Cassandra, and Neo4j query shapes with runnable examples.
  • CRUD: SQL vs NoSQL — Compare relational CRUD with MongoDB document operations.
  • Document Modeling — Embedding vs references, bounded aggregates, schema evolution, indexes, and concurrency.
  • Key-Value Modeling — Key design, TTLs, caching, atomic commands, idempotency, and hotspots.
  • Wide-Column Modeling — Query-first tables, partition keys, clustering, bucketing, denormalization, and tombstones.
  • Graph Modeling — Nodes, relationships, path traversal, supernodes, graph projections, and Cypher.
  • Consistency, Transactions & Replication — Atomicity boundaries, replication, quorums, conflicts, retries, and multi-region trade-offs.
  • Operating NoSQL & Polyglot Persistence — Source-of-truth design, CDC/projections, backups, capacity, observability, and operational ownership.

Database Security and Best Practices

Database Engines

  • SQLite — Lightweight, serverless SQL database.
  • MySQL — Popular open-source RDBMS.
  • PostgreSQL — Advanced open-source database system.
  • MongoDB — Document-oriented NoSQL database.
  • Neo4j — Property-graph database and Cypher query model.
  • AWS Database Services — Choosing managed database services on AWS.
  • Choosing a Database — Selection criteria, workload patterns, scaling, availability, and cost.
  • GCP Database Services — Choosing managed database services on Google Cloud.
  • Microsoft SQL Server — SQL Server setup, T-SQL, indexing, concurrency, columnstore, HA, and Microsoft ecosystem use.
  • Redis — In-memory data structures, caching, TTLs, persistence, replication, and clustering.
  • Apache Cassandra — Wide-column modeling, partition keys, tunable consistency, replication, and LSM storage.
  • OpenSearch and Elasticsearch — Full-text search, mappings, analyzers, shards, replicas, and search-engine architecture.
  • ClickHouse — Columnar OLAP, MergeTree design, sorting keys, partitions, and real-time analytics.
  • Distributed SQL — Consensus, distributed transactions, ranges, multi-region placement, and CockroachDB examples.
  • Azure Database Services — Choosing Azure SQL, PostgreSQL, MySQL, Cosmos DB, Managed Redis, and related services.

Big Data and Data Warehousing

Object-Relational Mapping (ORM)

Exercises and demonstrations

References

Books

Courses

Practice and visual guides

Further reading

Contributing

Corrections, examples, and new topics are welcome.

  1. Fork the repository.
  2. Create a focused branch, for example git checkout -b improve/indexing-notes.
  3. Make and review your changes.
  4. Commit with a clear message.
  5. Push the branch and open a pull request.

Please keep contributions accurate, concise, and consistent with the surrounding notes. Include practical examples and references where they improve clarity.

License

This project is available under the MIT License.

Explore related projects