5 ms·
People who don't understand databases theory complain, news at 11. it isn't helpful when the data model evolves over time No, poorly designed and maintained d
by Retric 18y ago
People who don't understand databases theory complain, news at 11.
it isn't helpful when the data model evolves over time
No, poorly designed and maintained databases have issues, but that's a developer problem not a database problem. SQL is highly flexible and you can dynamically update the database format at run time which few "modern" languages let you do. IMO, The problem is developers who think OOP means all data must map 1 to 1 with an object which manipulates that data and then complain that the database is now tightly coupled with their code.
As to scalability it's that's a software problem that has little to do with the relational model. A link's to B and B is somewhere out in the cluster works just fine. You can even write a relational engine that uses a key value store to keep the records.
PS: I like to think of it as Java/C++/whatever infecting the database.
- Femur 18y agoHere here! Well worded! This argument about the relational model have been coming up for years and I see articles like this all the time. The fact is that RDBMSs work great when properly implemented and maintained. They are very commonly used and are not going away any time soon.
- jrockway 18y agoThe fact is that RDBMSs work great when properly implemented and maintained. Programs written in assembly also work great when they are properly implemented and maintained. The thing is, properly implementing and maintaining it is difficult and time-consuming. Alternatives to assembly made implementing and maintaining software easier; why do you think that this won't happen with databases? (I consider RDBMSs as "assembly" because everyone thinks they can solve every problem. But you have to work at a very low-level to solve certain kinds of problems with a relational database. Something higher-level is an improvement, even if it isn't "necessary". You can write your Web 2.0 app in CPU microcode, but you probably shouldn't.)
- dasil003 18y agoThat's not really a fair comparison though. There's no parity mismatch between assembly and high level languages. Sure assembly opens a few doors for optimization, but you don't give up any fundamental logic when you move to a higher level language. As for RDBMS, well, they have scaling issues because of the rich functionality they provide, and some queries can definitely be tricky for the same reason. However conceptually they are much more straightforward than assembly, and offer a very pure data model with more overall utility than any of the alternatives. That's not to say that we don't need alternative data stores for some applications. But I do want to go on record as saying this article is a mixture of hype and FUD. RDBMS' have been challenged for decades by alternative supposedly-superior technologies. I think the problem is that no model is as comprehensive as the relational model. It's trivial to write a faster database providing some subset of SQL. You can even reduce the parity mismatch to some languages by making it store objects more directly. That's great, but I have yet to see any serious challenge to the relational model's stengths, instead all I see is hype and tutorials about how to convert some simple query to map-reduce.
- jrockway 18y agoInstead all I see is hype and tutorials about how to convert some simple query to map-reduce. The people that are actually implementing these systems don't have much time to talk about it. I helped write an object database system called KiokuDB almost a year ago, but I still haven't had a chance to write a good blog post about it. There is too much other stuff to do, and writing about databases is an invitation for lots of whiny RDBMS fanbois. (I wrote an article about Elephant, posted it here, and most of the comments whined about how useless object databases are. So whatever, I will use them to do my work, and you guys can discover them for yourselves.)
- dasil003 18y agoNice indirect ad-hominem. I never said that the relational model is the end-all-be-all for databases. If lumping me into your giant fanboism strawman makes you sleep better then so be it.
- jrockway 18y agoPS: I like to think of it as Java/C++/whatever infecting the database. Java and C++ are not OOP, so think again.
- wheels 18y agoSpoken like someone who has never implemented a large graph in a relational database. One of the main things you do with a graph is traversal, not just recalling edges. Doing graph traversal in an RDBMS is beyond painful. Every edge you traverse typically comprises of one query. Sending that rate of queries to an RDBMS isn't anywhere close to efficient. As for key-value stuff, that can be done pretty easily in an RDBMS, but is often more natural in databases geared specifically towards that. If you'd prefer not to use those sorts of systems, by all means, don't. Relational databases break down at the point that the sort of queries that you're interested in running don't map flexibly to a relational model. You can insist this isn't the case with handwaving and saying the guy that wrote the DB doesn't know anything about databases, but Google, Amazon, eBay and LinkedIn (just to name the few that come to mind off the top of my head) disagree.
- davidmathers 18y ago"Doing graph traversal in an RDBMS is beyond painful. Every edge you traverse typically comprises of one query." You mean MySQL doesn't do transitive closure? Sounds like a product problem, not a relational database problem.
- jrockway 18y agoI think he means graphs with cycles.
- davidmathers 18y agoMy graph-fu is weak. If it's not too much time could you give me an example of something that can't be done with a transitive closure statement?
- Retric 18y agoCreating a Key Value DB from scratch is simpler than creating a RDBMS from scratch. So, when no existing RDBMS meets your needs creating a Key Value DB and dealing with it's limitations is a reasonable solution. See Big Table and others. As to graph traversal you can do more with SQL than you might think. Granted I just came up with it on the fly but you get the idea. Let's say you're DB represents a 3d Maze and you want to find the shortest path from A to B. Well create a temporary table with a copy of that data and a new weight field, run an update command on all nodes if it links a node that has a weight, or the sum of those weights is less than it's current weight. Keep running that update until you find a solution. Total SQL commands is equal to distance not number of nodes on the graph. PS: There are many types of graph traversal and this is far from an ideal solution, but clearly 1 command per node is not needed. Also many Databases let you run custom code when existing queries don't meet your needs.
- gnaritas 18y agoIt's not that relational databases aren't good at what they do nor is it that developers don't understand them. They're fantastic at it; it's just what they do isn't what app developers really need. For the most part, app developers aren't looking for a store that allows them to query their data 6 ways from Sunday if they write 50%+ more code to put their data in there. What they're looking for is rock solid transactional persistence for the data structures their applications actually use. Relational databases primary use in the enterprise market is really as an integration point, a central location for all business data that all applications can access. It does this very well, but the times are changing and more and more apps are being written Internet style where integration is done via web services at the application level. Relational databases aren't going anywhere any time soon, but their dominance as the default solution of choice is coming to and end. Object/Graph/Key-Value database are being used more and more because they actually solve the problem app developers want solved; they reduce the code that needs to be written in the application to deal with persistence to virtually nothing. Developers are perfectly willing to trade queryability and and data consistency for simplicity, availability, and easy scalability across farms of servers. Dealing with the consequences of pointer chasing is less work that writing the code necessary to fit a graph of objects into a relational database.