Well, the first thing you get around is blocking the lines.
Say you have a wide line and you need to update it. This means that this row must be locked. No other author can update it at that moment, because it is blocked. They must wait until the lock is released.
With high and thin data is contained in one field in a short line, which updates it, does not cause problems for other authors who want to update their thing, which is on a separate line.
Tall and thin also lends itself to creating dynamic relationships, expanding the user base, faster indexes, better response time.
Humanly readable, this is not real, but it is easier for machines to cope, unite, change, change structures.
If you have a relational object mapping interface (e.g. Java Hibernate, php Eloquent, etc.), it becomes absurd to easily turn it into a oneToMany or ManyToMany relationship and update, modify, query objects in general.
Tall and Thin also makes it easy to implement the same data objects elsewhere without having to view views to sanitize / delete unwanted data.
For instance:
I have a database of prices for product A, product B, product C. Prices have dates, they are active, corresponding to the seasons (Christmas, etc.). All products in my example are managed in the same seasons.
wide:
date_from | date_to | ProductA_price | ProductB_price | ProductC_price 22-10-2000| 22-11-2000 | 100 | 110 | 90 23-11-2000| 26-12-2000 | 200 | 210 | 190 27-12-2000| 22-01-2001 | 100 | 110 | 90
Now, if you want to add an additional product, you need to do the following:
- Change table. This can be very expensive on a large table, leading to a crash.
- update prices causing many row locks
- Change requests. Requests are used ALL OVER THE PLACE. All of them should consider an additional column, especially if
select *
. - Change executable code. There can be broken an extra column, sloppy loops. Array iterators must be modified to account for the additional product.
- It starts a long time after the change if the software base is a little outdated.
- update hardlinked table name references
Tall:
table: Products id | product_name 1 | ProductA 2 | ProductB 3 | ProductC table: Periods id| name | date_from | date_to 1 | autumn | 22-10-2000| 22-11-2000 2 | xmas | 23-11-2000| 26-12-2000 3 | newyear | 27-12-2000| 22-01-2001 table: Prices product_id | period_id | price 1 | 1 | 100 2 | 1 | 110 3 | 1 | 90 1 | 2 | 200 2 | 2 | 210 3 | 2 | 190 1 | 1 | 100 2 | 1 | 110 3 | 1 | 90
Now, if you want to add an additional product, you need to do the following:
- Add product to product table
- Add entries in the price table for perioddate> now ()
Since it is all relational, the code already considers it relational and will read it as such and simply add it to the existing code stream.