4 ms·
...is there any point in making a db so "fat" feature wise? ...isn't a text field where I can serialize anyth anyway I like (with the related logic in my app of
by nnq 14y ago
...is there any point in making a db so "fat" feature wise? ...isn't a text field where I can serialize anyth anyway I like (with the related logic in my app of course) enough for 99% and things like this a feature that only benefits 1%?
- ocharles 14y agoYour database should be the central storage of this data and it should do it's hardest to guarantee that everything is consistent. Consistency means referential integrity over foreign keys, but it also means that values of attributes are well within their specified domain. And "D]7843bn;hdbnb" is not valid JSON, so the database should reject that. If your database is already doing these checks, then it can simplify anything that builds on them, because you already have huge amounts of guarantees. Other guarantees you would add are unique constraints, exclusion constraints, check constraints, and so on. So it might only benefit 1%, but what's the problem with that? If you want to stuff JSON into a text field, no one is stopping you. Of course, now you'd have much less reason to do so, and would be loading a gun getting ready to shoot yourself in the foot...
- nnq 14y ago...instead of "would be loading a gun getting ready to shoot yourself in the foot" I'd see it as building an app that could easily be maintained by a/more programmer(s) with no advanced DBA knowledge (less people with less expertise needed, and have the really smart know-it-alls work on more interesting things - and yes, I am thinking this from a MANAGER'S perspective, guilty on that ;) )
- alexro 14y agoand that's why one reason for MySql popularity is its simplicity. Instead of having full alphabet of features it just has A and B, and its easy to learn. BTW I'm not a fan of MySql.
- nnq 14y agoIndeed. But when it comes to learning, isn't learning the basic subset of Postgres commands just as easy as the basic subset of MySQL commands and so on? I don't see any difference in learning curve between the 2... (but what I'm afraid of about adding all this features is that one day "take the basic set of Postgres features" will become more like "pick a subset of C++ features (that YOU THINK are basic)" and we know where this path goes...)