📘 CodingMarble Learn

Databases and Our Society

A database is an organised collection of data that many people can share, search and update. Shops, schools, banks and hospitals depend on them. A database stores data, lets people find it fast, keeps it correct and safe, and arranges it using a data model: table (relational), tree (hierarchical) or web (network).

🎬 Step-by-step story

  1. A shop, a school, a bank and a hospital. Each one needs to remember a lot of facts about people and things.
  2. Instead of each keeping messy papers, they all share one database. Coloured dots show data flowing in and out.
  3. Inside, data is kept as records. Each row is one thing, like one student. Each column is one fact, like the name.
  4. Model 1 is the table (relational model). Tables are simple and can be linked by a shared value like an ID.
  5. Model 2 is the tree (hierarchical model). One top item has children, like a school with classes and students.
  6. Model 3 is the web (network model): an item can have many links. Tap the buttons to compare all three.

Tip: drag the 3D scene to turn it. Use two fingers to zoom.

🤔 Common doubts, cleared

Why not just use paper files?

Paper is slow to search, easy to lose, and the same fact is repeated in many places. A shared database fixes all three.

What is a record and a field?

A row is one record (one student). Each column is a field (one fact, like Name).

How are tables linked?

Tables share a key such as a student ID, so a marks table can point to the right student.

When do I use a tree?

When data has fixed levels with one parent each, like a school, its classes and students.

How is the web different from the tree?

In the web one item can connect to many others, so there can be several parents.

Databases and society

A database is an organised collection of data stored so it can be found and used easily. Almost every service uses one: online shopping, school records, hospital files, bus and train tickets, banking and maps. Because so much of life depends on databases, they must be correct, available and private. Wrong or leaked data can hurt people, so those who run databases carry a big responsibility.

Information technology that supports databases

Databases need technology around them:

Purpose and functions of a database

The purpose is to keep data in one shared, organised place instead of many messy copies.

Database data models

A data model is the way data is arranged.

Key formulas and definitions

Worked examples

1. A school keeps student marks on paper in each class, and a new address must be changed in 3 places. How does a database help?

In a database the address is stored once. Change it once and every report shows the new address.

2. Which model suits a folder with sub-folders and files?

The hierarchical (tree) model: each file has one parent folder.

3. A table Students has columns ID, Name, Class. How many fields does one record have?

Three fields: ID, Name and Class. One row is one record.

Common mistakes

Practice quiz

1. A database is:
2. In a table, one row is:
3. Which model has one parent per item?
4. Which is the most common model today?
5. Which is a function of a database?

Practice: answer these yourself

Type or choose your answer, then press Check. Use a hint if you are stuck; the full solution appears after you answer.

Frequently asked questions

What is a database in simple words?

It is a neat store of facts that many people can search and update at once, like a smart, shared notebook.

What are the three data models?

Relational (tables), hierarchical (tree) and network (web).

Why do schools and banks need databases?

They keep millions of facts correct, quick to find and safe, which paper cannot do well.

Where this is taught

Japan高校(専門学科)1〜3年Databases

Learn next

Related lessons

All Computer Science lessons