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:
- Networks and the internet let many people reach one database from different places.
- Servers are strong computers that store the data and answer requests.
- Storage (disks, cloud) keeps huge amounts of data.
- Software (DBMS) manages the data. Apps talk to it, for example with the language SQL.
- Security tools such as passwords and encryption protect it.
Purpose and functions of a database
The purpose is to keep data in one shared, organised place instead of many messy copies.
- Store large amounts of data.
- Search quickly (find all students of Class 8).
- Update without breaking things (change a phone number once).
- Share with many users at the same time.
- Keep correct: avoid repeated, conflicting data.
- Protect: only allowed people can see or change data.
Database data models
A data model is the way data is arranged.
- Relational (table): data in tables of rows and columns. Tables are linked by shared values (keys). The most common today.
- Hierarchical (tree): data in a tree. Each item has one parent. Good for fixed levels, like folders.
- Network (web): an item may have many parents and many children, so links are flexible but harder to manage.
Key formulas and definitions
- Database = organised, shared collection of data
- Row = one record; column = one field
- Models: relational (table), hierarchical (tree), network (web)
- Key = a value that identifies a row or links tables
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
- Thinking a database is the same as a spreadsheet. A database is built to be shared, safe and searchable by many users.
- Mixing up row and column. A row is one record; a column is one kind of fact.
- Saying the tree model lets an item have two parents. That is the network model.
- Forgetting privacy: data about people must be protected.