Exercise: Classifying Databases & Lab Setup

Belongs to: Classifying_Database_Systems · Duration: ~45 min · Work in pairs


1. The relational column — from memory (10 min)

Close the scriptum. Fill in the relational column of the classification grid from what you know about MySQL. Then open the scriptum and compare. Mark everything you missed or got wrong in a different colour.

CriterionRelational (your answer)
Data model
Schema
Query language
Relationships
Transactions
CAP (default)
Scaling
Strengths
Weaknesses
Typical use
Examples

2. Spot the weak point (10 min)

For each requirement, explain in one sentence what a relational database would struggle with — or write “no problem” if it handles it well.

RequirementProblem for relational?
a) An online shop stores 50 000 orders per day and needs correct stock levels.
b) A sensor network sends 2 million measurements per second.
c) A product catalogue: books have ISBN and author, monitors have size and resolution, shoes have size and colour — new product types every month.
d) A social network wants “people you may know” (friends of friends of friends).
e) The school wants a monthly report: average grade per class and subject.

3. Which family fits? (15 min)

For every scenario choose the best fitting family (relational, document, key-value, graph, wide-column). Justify with one criterion from the grid. Use the decision diagram in the scriptum if you are unsure.

#ScenarioFamilyCriterion / reason
1User sessions of a web app that expire after 30 min
2Bank transfers between accounts
3Blog posts with comments, tags and varying extra fields
4”Which other students attend the same courses as my friends?“
5Temperature values of 10 000 sensors, read per sensor and time range
6Like counter for posts, updated 50 000 times per minute
7Detect groups of bank accounts that transfer money in circles
8User profiles of a mobile game, each with inventory and settings
9Stock management of a warehouse
10Chat messages: “load the last 50 messages of this chat room” for millions of rooms

4. Lab setup for the next lessons (10 min)

In the next lessons you will work with a MongoDB cluster, Valkey and Neo4j. Download the images now, so we do not wait next time.

  1. Download nosql-lab.zip from the course page and unzip it. It contains docker-compose.yml and a folder data/.
  2. Open a terminal in that folder and run:
docker compose --profile all pull
  1. Test that everything starts:
docker compose --profile all up -d
docker compose --profile all ps

All six containers (mongo1, mongo2, mongo3, valkey, neo4j, graph-mysql) should be running.

  1. Open http://localhost:7474 in the browser — the Neo4j login page should appear. (Login: neo4j / insy-neo4j. You don’t need to do anything there yet.)
  2. Stop everything again:
docker compose --profile all down

Port conflicts? If one of your own containers already uses port 6379, 7474 or 7687, stop it first (docker ps, then docker stop <name>). Our MySQL uses port 3307, MongoDB exposes no ports — so they don’t clash with your existing databases.


Hand-in

  1. Your relational column (task 1) with the corrections marked.
  2. The tables from tasks 2 and 3.
  3. A screenshot of docker compose --profile all ps showing all containers running.