AiTeky Original Interactive Learning & Practice Intermediate
Document databases: storing, querying and sharding JSON-like data
Store an order as one document, write the find and aggregation-pipeline questions in plain Python, choose between embedding and referencing by measuring both, and see how a shard key spreads (or piles up) the data.
A document database keeps each thing as one self-contained, JSON-like record: an order with its items inside it, a product with its reviews. There are no joins to write for the common case, and records in one collection need not all have the same fields. That is why it suits catalogues, profiles, events and content.
In this course the documents are ordinary Python dictionaries and the queries are small functions you can read line by line, so you can see exactly what a find or an aggregation pipeline does. The query ideas are the ones a real document database such as MongoDB uses; the commands differ in detail, so check the product's own documentation for exact syntax. All data are made up for teaching.
- Learn lessons explain one idea at a time and let you run it.
- Industry ready lessons decide and justify, and end with interview questions.
You need basic Python (lists, dictionaries, loops). No database is installed.
- βΆ Run code in your browser. Nothing to install
- β Exercises that check themselves
- π Tap a word to see what it means
Locked. Sign up free
Learn
Understand each idea with everyday examples. No coding background needed.
- 00 25 min π AiTeky Pass Start here: documents instead of rows See how a document database keeps a whole customer, with the things that belong to it, in one record, and when that is easier or harder than separate tables.
- 01 30 min Free sample π AiTeky Pass An order as one document Store one order with its customer address and its items inside a single JSON-like document, add a field to some documents but not others, reach into nested fields with a dotted path, and see what a relational design needs to rebuild the same order.
- 02 35 min π AiTeky Pass Asking questions: find and the aggregation pipeline Build a tiny find that understands greater-than and in-a-list conditions, then chain match, group, sort and limit stages in a pipeline to get revenue by city, so you can read a real aggregation pipeline without fear.
- 03 35 min π AiTeky Pass Embed or reference, and how a shard key spreads data Model a blog post with its comments two ways, embedded in the post and referenced from a second collection, measure reads and the size problem of an ever-growing document, then split data across four servers by hash and by date and see which one piles everything on one server.
Industry ready
Real problems from real jobs, and the questions interviewers ask about them.

