Section 2 of 3 · 18 lessons
NoSQL
A technician wants the whole inspection on one screen. A sensor needs to send readings quickly, while the dashboard keeps asking for the latest one. Should all of those jobs store their records in the same way? Work through keys and documents with Botie, then follow what happens when we divide the records among machines or keep several copies. Each choice changes the questions we can answer easily and the failures we need to handle.
Choosing the Shape of the Records
The team looks up a pump by its ID many times a day. Other jobs need an entire inspection or a summary across sites. Begin with those questions and see why a useful way to store one answer can be awkward for another.
Working Inside Documents
A nested record is convenient to save, but we still need to find particular measurements and change the intended field. Follow each path into the document and account for values that are missing.
Finding and Summarising Documents
The collection grows beyond what we want to read for every question. Organise a route to likely matches, then follow the selected documents through the operations that produce a useful summary.
Partitioning for the Questions We Ask
One site sends far more readings than the others. Work out where those records go and which records a query must visit before choosing how to divide the data.
Reading and Writing Replicated Records
Two technicians can see different versions of the same work order. Follow the copies and the updates to understand which answers a read can promise and how a competing write should be handled.
Keeping Derived Data Repairable
A summary can fall behind its source, an old document can have a different shape, and a backup can omit recent work. Keep enough information to detect those gaps and rebuild a trustworthy result.
Serving Model Data
A fast lookup still gives a model the wrong input if it returns a stale value or information from the future. Bring the storage decisions back to the inspection the model is helping us make.