IB Computer Science · A3 · Databases
A3.4 Alternative databases and warehouses
Describe NoSQL databases, compare them with relational databases for different scenarios, and explain the purpose, advantages and disadvantages of data warehouses.
1/5NoSQL databases store data in non-relational forms
Part 1 of 5: NoSQL databases store data in non-relational forms
Linked tables suit neat, regular data. Some data fits them poorly, such as social media posts, sensor readings or product details that vary widely. A NoSQL database stores data in a model other than related tables.
NoSQL covers several designs, which are compared below. Many of them were built to spread data across many servers. This helps them cope with very large amounts of data.
Common NoSQL database types
- Type
- Document
- Stores data as
- Self-contained documents
- Typical use
- Product catalogues
- Type
- Key–value
- Stores data as
- A unique key paired with a value
- Typical use
- Session data
- Type
- Graph
- Stores data as
- Nodes joined by links
- Typical use
- Social networks
- Type
- Wide-column
- Stores data as
- Rows whose columns can vary
- Typical use
- Very large datasets
A document database, for example, may store a customer and their orders together in one document. No join is then needed to read them.
Key term
NoSQL database
A NoSQL database is a database that stores data using a model other than related tables, often with a flexible schema and a distributed design.
Part 2 of 5: Flexible schemas and horizontal scaling define NoSQL
Two features explain why organisations choose NoSQL. The first concerns structure. A relational database has a fixed schema, so tables and data types are defined before any data is stored.
Many NoSQL databases use a flexible schema instead. Two records in the same collection can hold different fields. A new field can appear without redesigning the database.
The second feature is scale. Many NoSQL systems support horizontal scaling, which means adding more servers to share the load. Relational systems more often scale by upgrading one server.
Key terms · tap one for its definition
schema
A schema is the definition of a database’s structure, including its tables, fields, data types and relationships.
horizontal scaling
Horizontal scaling is increasing a system’s capacity by adding more servers, rather than upgrading a single server.

Quick check
One question on the part you just read
Easy
Show answer and explanation
Answer: A · Worked explanation
Part 3 of 5: The best choice depends on the scenario
Choosing a database means matching its strengths to the task. The table compares the two approaches.
Relational compared with NoSQL
- Feature
- Schema
- Relational
- Fixed in advance
- NoSQL
- Often flexible
- Feature
- Relationships
- Relational
- Joined using keys
- NoSQL
- Often stored inside documents or links
- Feature
- Consistency
- Relational
- Strong, using transactions
- NoSQL
- Varies, sometimes relaxed
- Feature
- Scaling
- Relational
- Usually vertical
- NoSQL
- Often horizontal
- Feature
- Suited to
- Relational
- Accurate, structured records
- NoSQL
- Varied, fast-growing data
A bank needs every transfer to be accurate, so a relational database fits. A social app storing varied posts for millions of users may prefer NoSQL. Many organisations use both.
Match each feature to a need in the scenario. Ask whether accuracy, flexibility or growth matters most.
Part 4 of 5: A data warehouse gathers data from many sources for analysis
So far we have looked at databases that run daily tasks. An operational database supports an organisation’s day-to-day transactions, such as taking orders or updating stock. Organisations also need to study what happened over years.
A data warehouse is a large central store of data from many sources. It is built for analysis and reporting, not for daily transactions. It holds historical data that is mostly read and rarely changed.
Data enters the warehouse through ETL, which has three stages.
- Extract: copy the data from each source system.
- Transform: clean it and convert it to one consistent format.
- Load: store the result in the warehouse.
Key terms · tap one for its definition
operational database
An operational database is a database that supports an organisation’s day-to-day transactions, such as taking orders or updating stock.
data warehouse
A data warehouse is a large central database that stores integrated, historical data from many sources to support analysis and reporting.
ETL
ETL is the process of extracting data from sources, transforming it into a consistent format and loading it into a data warehouse.

Quick check
One question on the part you just read
Easy
Show answer and explanation
Answer: B · Worked explanation
Part 5 of 5: Warehouses support decisions but bring cost and complexity
Once data is in a warehouse, analysts can search it for patterns. Data mining is the analysis of large datasets to find trends and relationships. A retailer might find which products sell best in each season.
Running this analysis on the warehouse keeps the operational systems fast. Staff and customers are not slowed down.
Advantages and disadvantages of data warehouses
- Advantages
- One consistent view of data from many sources
- Disadvantages
- Costly to build and maintain
- Advantages
- Historical data supports trend analysis
- Disadvantages
- ETL is complex and can introduce errors
- Advantages
- Analysis does not slow operational systems
- Disadvantages
- Data may be out of date between loads
- Advantages
- Supports better-informed decisions
- Disadvantages
- Concentrated sensitive data is a security risk
A warehouse is a tool, not a guarantee. Poor quality data loaded into it leads to poor decisions. Organisations therefore weigh the benefits of analysis against the cost of building and running the system.
Key term
data mining
Data mining is the analysis of large datasets to discover patterns, trends and relationships that are not obvious.
Check your recall[15 marks]
6 written questions. Answer each one in your head or on paper, then open the mark scheme.
- 1.Describe[2 marks]
Describe two features of NoSQL databases.
Show mark schemeHide mark scheme
Model answer
Many NoSQL databases have a flexible schema, so records can hold different fields without redesigning the database. Many also support horizontal scaling, which adds servers to share the load.
- 1 mark for describing a flexible schema
- 1 mark for describing horizontal scaling or another feature such as a non-relational data model
- 2.Distinguish[2 marks]
Distinguish between the schema of a relational database and that of many NoSQL databases.
Show mark schemeHide mark scheme
Model answer
A relational database has a fixed schema that defines tables and data types before data is stored. Many NoSQL databases have a flexible schema, so records can hold different fields.
- 1 mark for stating that a relational schema is fixed in advance
- 1 mark for stating that many NoSQL schemas are flexible
- 3.Discuss[3 marks]
Discuss whether a relational or a NoSQL database is more suitable for the account records of a bank.
Show mark schemeHide mark scheme
Model answer
A relational database suits a bank because the data is structured and every transfer must be accurate, which transactions and strong consistency support. A NoSQL database offers flexibility and scale, but its consistency may be weaker. The relational database is therefore the more suitable choice.
- 1 mark for identifying that bank records are structured and must be accurate
- 1 mark for stating that a relational database supports transactions and strong consistency
- 1 mark for considering NoSQL strengths or weaknesses and reaching a conclusion
- 4.Explain[3 marks]
Explain the purpose of a data warehouse in a large retail organisation.
Show mark schemeHide mark scheme
Model answer
It collects data from many sources, such as tills and websites, in one consistent store. Analysts can use the historical data to find trends and support decisions. The analysis runs on the warehouse, so daily operational systems are not slowed.
- 1 mark for stating that it combines data from many sources
- 1 mark for explaining that historical data supports analysis and decisions
- 1 mark for stating that it keeps operational systems from being slowed
- 5.Outline[3 marks]
Outline the ETL process.
Show mark schemeHide mark scheme
Model answer
Extract copies the data from the source systems. Transform cleans the data and converts it to one consistent format. Load stores the result in the data warehouse.
- 1 mark for outlining extract as copying data from sources
- 1 mark for outlining transform as cleaning and converting the data
- 1 mark for outlining load as storing it in the warehouse
- 6.State[2 marks]
State two disadvantages of data warehouses.
Show mark schemeHide mark scheme
Model answer
They are costly to build and maintain. ETL is complex and can introduce errors, and the data may be out of date between loads.
- 1 mark for stating one disadvantage
- 1 mark for stating a second disadvantage

Practice this topic
10 quick-fire multiple-choice questions, easy to hard. Tap an answer to see if you're right and the worked explanation. (The written questions with mark schemes are under “Check your recall” above.)
0 right0 of 10 answered
Includes the 2 quick checks in the note above.
EasyState[1 mark]
Show answer and explanation
Answer: C · Worked explanation
MediumIdentify[1 mark]
Show answer and explanation
Answer: D · Worked explanation
MediumIdentify[1 mark]
Show answer and explanation
Answer: B · Worked explanation
MediumCompare[1 mark]
Show answer and explanation
Answer: C · Worked explanation
MediumIdentify[1 mark]
Show answer and explanation
Answer: A · Worked explanation
HardDetermine[2 marks]
Show answer and explanation
Answer: B · Worked explanation
HardExplain[2 marks]
Show answer and explanation
Answer: A · Worked explanation
HardDeduce[2 marks]
Show answer and explanation
Answer: D · Worked explanation