Database Normalisation and implicit immutability

Most compelling reason for data normalisation is to eliminate update anomalies. but, what if updates are not allowed in database, would you still normalize your data ?

Let’s say, there is a company, which sells car. Car price has a component called “pickup cost”. This pickup cost has two components namely, pickup_location and pickup_cost. You designed your table as shown below.

But you soon realize, this table design can cause update anomalies.

As the next, most obvious step, you normalized your table.

Now the question is, Would you normalize your data if you know that pickup cost will never be updated ?

Or would you normalize it if there was a business rule saying that pickup cost should not change after customer has agreed to a price. In fact, In this case normalisation would actually cause undesired mutation of row which should not change.

Even though every entry in database is mutable, yet there is implicit immutability in the business domain. Always keep an eye for these implicit immutability, and, never normalise immutable data.



Programmer, Samkhya canonist, ThoughtWorker

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store