The principles of database design, or, the Truth is out there by Eduardo Bellani

Every software project needs to represent the reality of the business he is embedded in. The way we can represent reality as limited rational beings is through propositions, i.e, declarative statements that affirm or deny something about reality. When a collection of such propositions is stored in a computer system, we call it a database.

Such database needs to be designed to properly reflect reality. This can’t be automated, since the semantics of the situation need to be encoded in a way that can be processed by a computer. Such then is the goal of database design: to encode propositions in such a way that can properly be processed by a database management system (DBMS).

At this point, a regular software developer comes to a stall. Since there is scarcely any formal training in database design (or formal logic) in his education, he tends to fall back haphazardly on ad-hoc methods, with severe consequences (update anomalies and data inconsitencies with huge potential downsides).

If you are such developer, you need to understand the underlying principles of database design. Think about it, if you don’t have principles of design, you are not doing engineering, are you?

Here is a list of design principles to follow for formal database design(McGoveran 2012, 2015)(Pascal 2016):

To these I’d like to introduce a new principle, an innovation I hope to develop in future work:

The following pseudo-SQL shows the contrast between improper and proper denotation:

  -- usage of surrogate keys
  create table citizen (
    id uuid primary key,
    national_id text,
    full_name text);
Code Snippet 1: Illustration of not using PED with SQL

This usage has some problems, the worst of it is the disconnection between database structure and domain semantics. Here is a rework that preserves such connection:

  create domain national_id as text check (...);

  create table citizen (
    national_id national_id primary key,
    full_name text);
Code Snippet 2: Illustration of using PED with SQL

Conclusion

Databases are representations of reality, and as such, they are foundational to any serious information system. Poor design leads to semantic confusion and technical instability—with consequences that can be costly and far-reaching. Good design demands rigor, discipline, and a firm grasp of foundational principles.

To put it simply: if you’re in the business of information, you need to know how to build structures that tell the truth that is out there.

References

Blakemore, Erin. 2019. “The Notre-Dame Cathedral Was Nearly Destroyed by French Revolutionary Mobs (Accessed on 2025-05-18).” https://web.archive.org/web/20190607211856/https://www.history.com/news/notre-dame-fire-french-revolution.
McGoveran, David. 2012. “Updating a Database.” Alternative Technologies Blog. http://w.alternativetech.com/publications/View%20Updating%206-12-12.pdf.
———. 2015. “Can All Relations Be Updated? (or Can Any Relation Be Updated?) Logic for Serious Database Folks Series.” Alternative Technologies Blog. https://www.alternativetech.com/publications/Logic%20for%20DB%20Folks%20Series%20XX%20-%20Updating%20Relations.pdf.
Pascal, Fabian. 2016. “The Principle of Orthogonal Database Design Part I.” https://www.dbdebunk.com/2016/09/the-principle-of-orthogonal-database.html.
Figure 1: But revolutionary Parisians had had enough of its royal resonance. The cathedral’s west facade featured 28 statues that portrayed the biblical Kings of Judah. In fall 1793, the new government ordered workers to remove them. They didn’t portray French kings, but no matter: The 500-year-old statues combined monarchy and religion, and they were brought to the cathedral’s square and decapitated. Twenty-one of the heads were only recovered in 1977, when workers found them behind a wall in an old Parisian mansion.(Blakemore 2019)

Figure 1: But revolutionary Parisians had had enough of its royal resonance. The cathedral’s west facade featured 28 statues that portrayed the biblical Kings of Judah. In fall 1793, the new government ordered workers to remove them. They didn’t portray French kings, but no matter: The 500-year-old statues combined monarchy and religion, and they were brought to the cathedral’s square and decapitated. Twenty-one of the heads were only recovered in 1977, when workers found them behind a wall in an old Parisian mansion.(Blakemore 2019)