Question bank › IB Computer Science › A3 Databases

Alternative databases, data warehouses, OLAP and distributed databases (HL)

Answer on paper first, then reveal the mark scheme one mark at a time.

1CoreHL only3 marks

A music-streaming company stores user profiles in a NoSQL document database instead of a relational database. Each profile is stored as one document, for example:

{ "userID": "u4471",
  "name": "Priya",
  "playlists": ["Gym", "Revision"],
  "devices": [{"type": "phone", "os": "Android"}] }

(a) Outline what is meant by a NoSQL database. [1]

(b) Outline two reasons why a document database suits these user profiles better than a relational database. [2]

2CoreHL only3 marks

A city council uses a spatial database to manage the locations of its streetlights, roads and park boundaries.

(a) Outline what is meant by a spatial database. [2]

(b) Suggest one query the council could run that would be difficult to answer with a standard relational database that has no spatial features. [1]

3StandardHL only5 marks

An online multiplayer game shows a live leaderboard that is updated thousands of times per second. The developers are choosing between an in-memory database and a cloud database service.

(a) Outline what is meant by an in-memory database. [1]

(b) Explain why an in-memory database suits the live leaderboard. [2]

(c) Outline one risk of an in-memory database and how it can be reduced. [2]

Stuck on Alternative databases, data warehouses, OLAP and distributed databases (HL)?

Get it sorted in a free 30-minute session

We work through your weakest questions on this topic on Zoom. I reply the same day.

4StandardHL only4 marks

A national chain of gyms copies data each night from its booking, membership and payments systems into a data warehouse.

Identify the data-warehouse objective (from: subject-oriented, integrated, time-variant, non-volatile) that is shown by each statement. [4]

  1. Membership records are stored with the date of every change, so the gym can compare member numbers in 2022 with 2026.
  2. The booking system stores gender as M/F and the payments system as 1/2; both are converted to one format when loaded.
  3. Once loaded, rows are never edited or deleted by users; new nightly data is only added.
  4. Data is organised around themes such as "members" and "class attendance" rather than around the individual applications that created it.
5HardHL only6 marks

A supermarket chain runs its tills on an operational (OLTP) relational database. Head office wants to analyse five years of sales to plan promotions and decides to build a separate data warehouse rather than run the analysis on the till database.

Explain how the append-only and query-optimized objectives of a data warehouse help head office, and why a separate warehouse is better than querying the till database directly. [6]

6StandardHL only5 marks

An electronics retailer stores quarterly sales (£000) in a three-dimensional OLAP cube with dimensions Region, Product and Time, as shown in the diagram.

RegionProductQ1Q2Q3Q4
NorthLaptops12095110150
NorthTablets60557085
SouthLaptops140100125170
SouthTablets75658090

(a) A manager looks only at Q3, for all regions and products. Identify this OLAP operation and calculate the total sales it shows. [2]

(b) The manager changes the Time dimension from quarters to whole years. Identify this OLAP operation and calculate the yearly sales for the South region (both products). [2]

(c) State the name of the operation that selects North, Laptops, Q1–Q2 only (restricting two or more dimensions). [1]

Q1Q2Q3Q4Time (quarter)NorthSouthRegionLaptopsTabletsProduct (depth)Sales cube (£000)
7StandardHL only6 marks

A bank applies data mining to its customer and transaction data.

(a) Identify the data-mining technique used in each case. [4]

  1. Flagging a card payment of £4900 at 03:00 in another country for a customer who normally spends under £60 a day.
  2. Predicting how much a customer will save next year from their income and age.
  3. Finding that customers who open a current account often open a savings account within three months, and then apply for a credit card.
  4. Grouping customers into segments with similar behaviour, without any segment labels known in advance.

(b) Distinguish between classification and clustering. [2]

8HardHL only6 marks

A shop mines its till data for association rules. Ten transactions are shown.

TransactionItems
1pasta, sauce, cheese
2pasta, sauce
3bread, milk
4pasta, cheese
5pasta, sauce, bread
6milk, cheese
7pasta, sauce, milk
8bread, cheese
9pasta, sauce, cheese
10milk, bread

(a) Calculate the support of the item set {pasta, sauce}. [2]

(b) Calculate the confidence of the rule pasta → sauce. Give your answer to 3 significant figures. [2]

(c) The shop only accepts rules with support of at least 40% and confidence of at least 70%. Determine, with working, whether the rule pasta → cheese is accepted. [2]

9HardHL only6 marks

A mail-order company stores its data in a distributed database across three sites, as shown in the diagram. The Customer table is split between the sites and the Product table is held in full at every site.

(a) Identify the type of partitioning used for the Customer table. [1]

(b) Explain one benefit of partitioning the Customer table in this way. [2]

(c) Explain how replicating the Product table provides fault tolerance. [2]

(d) Outline one disadvantage of replicating the Product table. [1]

Distributed database: three sites joined by a WANSite 1: LeedsCustomer rowswhere Region = NorthProduct (full copy)Site 2: BristolCustomer rowswhere Region = SouthProduct (full copy)Site 3: GlasgowCustomer rowswhere Region = ScotlandProduct (full copy)WAN link
10StretchHL only8 marks

A theatre chain runs a distributed database with sites in three cities. Customers can book any performance from any site.

(a) Describe what is meant by location transparency in a distributed database. [2]

(b) Two customers, at the Cardiff and Belfast sites, try to book the last remaining seat for the same performance at the same moment. The seat data is stored at a third site, Norwich. During one booking the network link to Norwich fails part-way through.

Explain how concurrency control and the ACID properties ensure that the seat is not double-booked and that the database stays correct. [6]

Stuck on this topic?

Book a free 30-minute session on WhatsApp and we'll find exactly which step is costing you the marks. Or build a timed paper on it.

Free 30-minute session