5 ms·
This article has a fundamental misunderstanding of relational databases. The building block of relational databases... is the mathematical term "relation". ht
by dragontamer 12y ago
This article has a fundamental misunderstanding of relational databases.
The building block of relational databases... is the mathematical term "relation".
http://en.wikipedia.org/wiki/Finitary_relation http://en.wikipedia.org/wiki/Finitary_relation
Relations are most efficiently stored in tables. The use of tables and all that has absolutely nothing to do with disc space, but everything to do with deduplication.
You see, when relations are pure and understood, it is literally impossible for certain data-corruption issues to come up. Each step of normalization wipes out a possible data-corruption issue.... from update inconsistencies to insert inconsistencies.
" A man with two watches never knows what time it is. "
Similarly, if you ever store the same data twice, you'll never really know which one is real. Especially if that bit of data were stored differently twice.
This is the fundamental rule that Relational Databases / Normalization follows. Normalization furthermore can be applied to any database. Relational Databases just so happen to be the most common... so almost algorithmic processes have been invented.
I would highly suggest to the author that he read Chris Date's relational database books before writing any more articles on databases in general. Chris Date is one of the inventors of the relational database btw, so I'll trust his opinion of relational databases over anyone else's.
- eigenrick 12y agoI agree that relational models have everything to do with deduplication. It is one area where purity in mathematics translates well to solving practical problems. It is often the case that the theoretic models of computation or storage translate very poorly to everyday use. If they can be represented, they are done so at cost, and are therefore not applied. Maybe I'm a pessimist, but I argue that, while normalization does do nice things for data consistency, people often use/used it because of disk storage savings. In my experience, they rarely, if ever, achieve a high enough level of normalization to get much benefit.
- dragontamer 12y agoI mainly study publicly known databases for this sort of stuff. I'm not a professional web developer, but I do what I can to keep up with technology. From this perspective, we can study Wikipedia's schema. As far as I can tell, the schema is designed for data consistency. http://upload.wikimedia.org/wikipedia/commons/3/36/Mediawiki_database_Schema.svg http://upload.wikimedia.org/wikipedia/commons/3/36/Mediawiki... As far as I can tell, Wikipedia is mostly operating in 3rd normal form (or higher), the general standard that most places go to. (6th normal form is the ultimate that no one bothers to get to). Besides, just because Relational Databases offer an easy path to normalization doesn't mean you have to use it. If you want to minimize the number of joins in your database for some reason, 1st normal form (aka: no normalization what-so-ever) is always available. Only recommended if joins really are becoming a problem though. ---------------- Besides, Relational Databases are hardly the most efficient at disk space. Every index, foreign key constraint or check condition often adds a ton of data to every datum. I'd argue that Key-Value stores are the most efficient at disk space usage. Certainly more-efficient than your typical relational database IMO.
- anonetal 12y agoIn addition to that, I think the author is also conflating "model" vs "implementation". Some of the legacy relational databases are somewhat slow, but 1 TB of data is hardly much even for something like PostgreSQL. The more sophisticated column-oriented databases and data warehouses would still be considered relational databases, and are much much faster (as I understand, for many applications, the primary downside of those is cost, rather than anything inherent in the relational model or the implementation). New, redesigned OLTP systems like VoltDB are also much faster than the original disk-based RDBMSs for transactional workloads.
- dragontamer 12y agoHeck, PostgreSQL 9.3 and above is consistently beating MongoDB in speed for instance. So Relational Databases can be (and often are) very fast databases. http://vibhorkumar.wordpress.com/2014/05/15/write-operation-mongodb-vs-postgresql-9-3-json/ http://vibhorkumar.wordpress.com/2014/05/15/write-operation-... I'm not an expert on the subject, but wasn't MapReduce the primary driver of NoSQL? Hadoop/HBase, etc. etc. Key-Value Store definitely (which has been mentioned), but even the most basic Key-Value store is more complicated than a glorified hash table.
- eigenrick 12y agoI love me some PG. :) There are a number of databases which are using unique storage models to achieve great numbers in circumstances for which their optimized (duh) DeepDB is an interesting one that is getting great throughput while running complex queries on incoming data. I believe they're using LSM Trees under the hood. I was definitely trying to avoid doing a survey of all of the products out there and what they're using (that would be a great article, though) I more wanted to make people cognizant of the models that they might encounter and why/how they're used. It was a bit ambitious to attempt that in a single article.