DigiBacc

Practice questions › IB Computer Science › Databases › Alternative databases and data warehouses
IB Computer Science · Databases

Alternative databases and data warehouses practice questions.

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.

At a glance

About this topic

Syllabus code
A3.4
Subject
IB Computer Science
Topic
A3 · Databases
Questions
30 with worked answers
Question types
9 multiple-choice questions · 8 flashcards · 6 fill-in-the-gap questions · 3 matching tasks · 3 true/false questions · 1 essay question
Try it

Sample questions on Alternative databases and data warehouses

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?

  • A document store, because each record carries its own set of fields
  • A relational database with one separate table for every carrier
  • A key-value store, because the stored value may contain anything
  • A data warehouse that is reloaded from every carrier once each night

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?

  • A key-value store that returns one member record per identifier
  • A graph database that follows the edges from node to node
  • A relational table queried with three successive joins of the table to itself
  • A data warehouse that is rebuilt from the app database each night

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?

  • It is the single copy that every till and every web order writes to
  • It is discarded at the end of each reporting period to free storage
  • It is historical and is not overwritten by day-to-day updates
  • It is kept in third normal form so that no value is ever repeated

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?

  • They are copied unchanged into a staging area of the warehouse
  • They are read out of each operational system in their original form
  • They are written into the fact table and indexed for reporting
  • They are cleaned and converted into one common format and unit

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?

  • Indexing
  • Sharding
  • Replication
  • Normalisation

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.

  • The basket is only ever fetched whole, by one identifier.
  • The basket holds several different fields rather than a single number.
  • The number of members using the website changes from one day to the next.
  • The basket has to survive a restart of the web server.

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 free
Exam tips

Command terms in this topic

Keep going

More topics in Databases

All of Databases →

30 Alternative databases and data warehouses questions — free with an account. Spaced repetition, streaks and full exam simulations included.

Practise them free

This 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.