Re:Back to basics: Writing an application using Go and Postg...
by Zababa on Tuesday November 23, 2021 @03:57AM
(#29315903)
From what I understand, data duplication can lead to consistency errors. And if you want to avoid data duplication, you're going to rewrite a relational database yourself, since you would want to put your data into normal forms to avoid duplication. I think I've read a few times on Hacker News that we already went through the alternatives to the relational database around the time of its birth, and that a few papers were published at the time on why this was a better solution than others.
The real question to me is, why can't we drop the relational database? In many small projects (where you would use an ORM) it is overkill. Why can't I create a list of plain-old-data objects in my language, then add indicies on that, and do fast queries directly in the language? Most languages already have a data structure with an index on one key (a dict, hashmap or similar). With C#'s LINQ or Pythons list comprehensions we already have half of the solution.