30 exam-style questions on Alternative databases and data warehouses — topic A3.4 of Databases in the IB Computer Science syllabus — with answers and explanations. Samples below; the full set is free with an account.
A logistics start-up stores one record per shipment. Every carrier supplies different fields, and new fields appear each month. Which store handles this best while the queries still have to filter on individual fields?
Answer: A document store, because each record carries its own set of fields
A document store keeps self-describing records, so a new field is added to one document without a schema change, and the query engine can still look inside the document. A key-value store would accept the data too, but its value is opaque and cannot be filtered on.
A social app must list, for one member, everybody reachable through at most three friendship links. Which store answers this most directly?
Answer: A graph database that follows the edges from node to node
In a graph database the relationship is stored with the nodes, so a traversal of depth three is a walk along edges whose cost does not grow with the size of the table. The relational answer works but needs one more self-join for every extra step, which is exactly the case a graph model is chosen to avoid.
Which statement describes the data held in a data warehouse rather than the data in the operational database that feeds it?
Answer: It is historical and is not overwritten by day-to-day updates
A warehouse is non-volatile and time-variant: loads add new snapshots instead of replacing the old ones, which is what makes comparisons over years possible. Live writing and strict normalisation are properties of the operational system it draws from.
During the transform stage of an ETL process, what happens to the records taken from the source systems?
Answer: They are cleaned and converted into one common format and unit
Transform is the stage that reconciles the sources: date formats, currencies, codes and duplicates are made consistent so that rows from different systems can be compared. Reading is extract and writing to the warehouse is load, and mixing these up is the standard error.
A document store outgrows a single machine, so its collection is divided across several commodity servers that each hold one part of it. What is this technique called?
Answer: Sharding
Sharding splits one collection horizontally so each server stores a different subset, which is how NoSQL stores scale out rather than up. Replication also uses several servers, but each of them holds a complete copy for availability instead of a part.
A shop's website keeps one saved basket per member. Every access reads or replaces the whole basket using the member identifier, and no query ever filters on anything inside a basket. Identify the fact in this description that argues for a key-value store rather than a relational table.
Answer: The basket is only ever fetched whole, by one identifier.
A key-value store gives fast access by key and treats the stored value as opaque. That is exactly right when nothing is ever searched inside the value, and it becomes useless as soon as queries must filter on individual fields.
That was 6 of 30 Alternative databases and data warehouses questions.
Practise all 30 freeDistinguishAO2 · 2–4 marks
Make the difference clear for BOTH terms — a definition of one of them is only half an answer.
OutlineAO1 · 1–2 marks
A brief account or summary: the main points in two or three sentences, no evaluation.
30 Alternative databases and data warehouses questions — free with an account. Spaced repetition, streaks and full exam simulations included.
Practise them freeThis platform is independently developed and is not endorsed by, affiliated with, or sponsored by the International Baccalaureate Organization. “International Baccalaureate” and “IB” are registered trademarks of the IBO.