From File Systems to Relational

Share
From File Systems to Relational
Photo by Caspar Camille Rubin / Unsplash

Databases: A Quick Overview

Before databases existed, applications each managed their own data files. Every program had its own format, its own storage, and no way to share data with anything else. This caused a lot of duplication, inconsistency, and maintenance headaches.

The database approach solved this by introducing a Database Management System (DBMS) — software that centralises data storage, manages access, and separates the data itself from the programs that use it. Instead of each app owning its data, everything goes through one managed system.

AI Generated Badge

How a Database is Structured

Modern databases follow a three-level architecture:

  • External level — what each user or application sees (their personal view of the data)
  • Conceptual level — the full logical picture of all the data and how it relates
  • Internal level — how the data is physically stored on disk

This separation means you can change how data is stored without breaking the applications on top, and vice versa.

How Data Models Evolved

Data models went through several generations:

  • Hierarchical — tree structure, each child has one parent; rigid and hard to maintain
  • Network — allowed more complex relationships, but required navigating physical pointers
  • Relational — introduced by E. F. Codd in 1970; data stored in tables, queried using SQL; became the dominant model
  • Object-Oriented and Object-Relational — extended the relational model to handle more complex, nested data structures

Designing a Database

Database design goes through three phases: conceptual (ER diagrams, entities and relationships), logical (turning that into tables and keys), and physical (deciding actual storage structures, indexes, and hardware).

Good design also means normalisation — organising tables to remove redundancy and prevent update errors. The main normal forms go from 1NF up to BCNF and 4NF, each removing a different type of data anomaly. When performance becomes a concern, controlled denormalisation can be applied to speed up reads at the cost of some extra write complexity.

Security

Database security operates in layers: access control (who can read or write what), views (showing only what a user is allowed to see), encryption (protecting data at rest and in transit), and physical redundancy via RAID for hardware fault tolerance. SQL injection is a key application-level threat, mitigated by using parameterised queries.


The overall story is one of progressive decoupling — moving from tightly coupled file systems toward clean separation of data, logic, and storage, with security and integrity built in at every layer.

Read more

Mastodon Social