How Databases Are Structured

The most common type is the relational database — tables of rows and columns, similar to a spreadsheet.

Tables, rows, and columns

Each table represents one type of entity. A library system might have a table for Books, a table for Members, and a table for Loans. Each row is one record (one book, one member, one loan). Each column is one attribute (title, ISBN, author; name, membership number).

Primary keys and relationships

Every table has a primary key — a unique identifier for each row. The Books table might use ISBN. Relationships are created using foreign keys. The Loans table stores both a member ID and a book ID, linking tables without duplicating data.

SQL

Relational systems are queried using SQL (Structured Query Language). A command like SELECT * FROM Books WHERE author = 'Orwell' retrieves all matching records instantly. SQL is one of the most widely used languages in software development. Coding and database skills together form the foundation of most software engineering roles.

How Databases Are Structured

Types of Databases

Relational systems are the most common, but different problems call for different storage approaches.

NoSQL systems

Non-relational systems store data in formats other than tables — documents, key-value pairs, or graphs. MongoDB stores data as JSON-like documents, making it flexible for applications where data structures vary. These systems often scale better for very large or rapidly changing datasets.

In-memory systems

Some data stores keep all data in RAM rather than on disk, making retrieval extremely fast. Redis is widely used as a cache — frequently accessed data is held in memory for milliseconds-fast access.

Graph systems

Graph databases represent data as nodes and edges — ideal for mapping relationships. Social networks, recommendation engines, and fraud detection systems use graph structures. Facebook's social graph (who is connected to whom) is one of the largest graph structures ever built.

Time-series databases

Specialised systems optimised for data recorded over time — sensor readings, stock prices, application logs. Cloud computing has made it practical to store and query vast time-series datasets that would have been impossible to manage on local infrastructure.

Types of Databases

Databases and Society

The systems that store and manage data have significant implications for privacy, security, and power.

Data breaches

When a system is compromised, the consequences can be severe. Breaches have exposed hundreds of millions of people's personal information — names, addresses, passwords, financial details. Understanding that personal data is stored in interconnected systems — and that those systems are targets — is part of responsible digital citizenship.

Data as power

Whoever controls large data stores holds significant power. Governments maintain records on citizens. Technology companies hold behavioural data on billions of users. The value of data — and who has the right to access, use, or delete it — is one of the defining political questions of the digital age.

GDPR and data rights

The EU's General Data Protection Regulation (GDPR) gives citizens rights over their personal data stored by organisations: the right to access it, correct it, and request its deletion. Understanding these rights matters for navigating digital life.

Databases and Society

Frequently asked questions

What is the difference between a database and a spreadsheet?
A spreadsheet is designed for human interaction — one person or small team entering and analysing data manually. A database is designed for applications to store and retrieve millions of records quickly and reliably, often simultaneously from many users. Databases enforce data integrity rules, support complex queries, and handle concurrent access in ways spreadsheets cannot.
What is SQL and do I need to learn it?
SQL (Structured Query Language) is the standard language for interacting with relational systems. It is one of the most consistently in-demand technical skills in the job market. Learning SQL enables you to retrieve, filter, and summarise data — skills useful in roles from software development to data analysis, marketing, and scientific research.
How do databases keep data secure?
Security measures include access controls (only authorised users can see certain data), encryption (data is scrambled so it cannot be read if intercepted), audit logs (recording who accessed what and when), and backups (copies stored separately in case of failure). Despite these protections, breaches occur — often through weak passwords, social engineering, or unpatched software vulnerabilities.
What is a cloud database?
A cloud database runs on remote servers managed by a provider rather than on local hardware. Services like Amazon RDS, Google Cloud SQL, and Azure Database offer fully managed systems — the provider handles backups, updates, and scaling. Cloud databases are now the standard for most new applications, as they reduce the infrastructure cost and complexity of running data systems.