|
Re: Database Denormalization and the NoSQL Movement
|
Posted: Sep 13, 2009 6:42 AM
|
|
i do not now use a terrible lot of very denormalized data, nor do i employ a lot of nosql dbs such as couchdbs; i believe the latter do heavily suffer from their values not being properly searchable. a proper relational database, it is true, is sort of a pita as for all the buerocracy that cometh with it; however, you also get to have a highly searchable base of data when not eschewing this hurdle.
i have, personally, even come to abandon any and all sql/oop object/relational mapping schemas, such as sqlalchemy and the likes. it sounds like a good idea, but in practice i find these orms to be in my way even with the simplest of tasks. the methods may differ, but i get the yikes when i see how complicated and convoluted it is to establish a connection to my data and handle it using that sqlalchemy funnel. brr.
what is wrong in this whole picture is, in my opinion, very simply that, generally speaking, in the oop world, people make the mistake of puttting their business data inside objects. and i think you're not supposed to do that. everybody does it thesse days, and i believe it is fundamentally wrong, at least when done in the naive object-oriented-programming-101-textbook way.
the way i do it now is i have cat objects with nothing but (1) the general, json-ifiable data on the kittens, a (2) generalized database that can, ideally, handle very data not only on cats, but also dogs, and so, in a single table, and (3) a CAT library (alongside with a DOG library etc) with all the methods and ways to handle felines (canines, what have you).
many will shout treason at this point but i am ready to bear that.
somehow at some point i broke the link that is supposed to be so close between the data structure and the ways to handle it, and ever since then, classical oop has been looking so broken to me. i am still looking for ways to bring the data and their methods closer together, but for the time being, i am quite happy tih the state of affairs.
|
|