Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

database-disco 🪩

course-verify

Coursework from a NoSQL Databases course (2019), modernized in 2026 so every part of it runs today. Four databases, one repo:

Where Database Topics
labs/lab02, labs/lab03 PostgreSQL DDL, constraints, match types, rules, psql meta-commands
labs/lab04 MongoDB shell queries, regex, cursors, map-reduce
labs/lab05, labs/lab06 CouchDB HTTP/curl CRUD, attachments, views, reducers, conflicts
labs/lab07, projects/MovieExampleNeo4j Neo4j Cypher, the movie graph, shortest path ("Bacon Path")
projects/project01 PostgreSQL + MongoDB Bob's Pizza — generate data, load both databases, compare them
projects/project02 PostgreSQL hospital schema design + query comparison writeup

Quickstart

docker compose up -d      # postgres:16, mongo:7, couchdb:3, neo4j:5
make install              # python deps (Faker, pandas, pymongo, psycopg, jupyter)
make generate             # seeded dataset -> projects/project01/generated/
make load                 # schema + data into Postgres and MongoDB
make verify               # assert counts, queries, and order placement in both DBs

Connection details (from docker-compose.yml): Postgres postgres:postgres@localhost:5432/bobspizza · MongoDB localhost:27017 · CouchDB admin:couchdb@localhost:5984 · Neo4j browser localhost:7474 (neo4j/databasedisco).

CI runs the same generate → load → verify pipeline on every push against Postgres and MongoDB service containers, then executes the walkthrough notebook headlessly. CouchDB and Neo4j are local-only.

What was modernized (2026)

The 2019 code is preserved in git history; the runnable path was fixed in place. Highlights — each one a real lesson, detailed in projects/project01/README.md:

  • The unsolved 2019 bug is solved — a Mongo query comparing an integer field against a string scanned 50,000 documents and returned 0; the fix ships with an index and a regression test in CI.
  • json.dumps vs json.dump — the notebook's JSON exports were silently written empty for six years.
  • db.system.js.save() is gone from MongoDB — the server-side order function was ported to client-side code (mongosh + Python versions).
  • Postgres types and FKs are honest now — quantities were VARCHAR, order references pointed at recipes that don't exist, and the PL/pgSQL order function had undefined variables plus invisible zero-width Unicode that broke psql.
  • Everything is seeded — identical data every run, which is what makes the CI assertions possible.

The labs/ folders keep their 2019 shell-era code as coursework record — labs/README.md maps each lab and flags the patterns that have since been retired.

About

NoSQL Databases course 2019

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages