84
"We ran out of columns" - The best, worst codebase - [Jimmy Miller]
(jimmyhmiller.github.io)
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Follow the wormhole through a path of communities !webdev@programming.dev
I worked on a system whose database setup looked kind of like this. Interesting to see, that they weren't the only ones using that approach.
We had an online database for online transactions, all tables used a sequence generator table (basically a key/value with the key being table name and the value being the last id) l, every few minutes all the new transactions where dumped into a second instance for research and monitoring. Every night a job started, that first dropped all the transactions older than a few weeks from the online db and then exploded every single transaction into a bunch of id, key, value tuples. These were then push/pulled (very weird construct) into the datawarehouse. Since each new value was its own table, we had something like 20 tables, mostly being nulls. You might had columns like serviceA_call1_customer3_adress_streetname. Absolutely bonkers and only one man understood that thing.
that one man
But denormalized databases are not a new thing. There are engines that build on it on purpose in order to be more efficient, like Cassandra. Most data warehousing engines use this "trick". And of course you can do it with a regular RDBMS too.