Skip to main content

Shifting Away From Tables To Entity Models

RDBMS relational data management systems, simply put, most Database systems allow us to create data models of businesses in terms of rows and columns in a table. Tables can be 'related' to indicate dependencies of data between tables. RDBMS was on the best things that ever happened to software abstractions. Every business domain has been modeled to be a set of tables and relations between them.

However, recently another paradigm is taking shape (at least, I only noticed it in the last year), called as Domain Driven Development, DDD for short, that emphasizes the importance of modeling a business in the domain of the business itself rather than dictated by abstractions tied to tables. DDD clout calls them "Entities" (not Tables).  In certain ways, I read this shift from RDBMS to Entity model as "shift from horizontal (table) abstractions to hierarchical (entity) abstractions".

While Entity models may provide a better modeling, in a well designed database model, based on my experience, you may not find any obvious issues with current table models. And definitely no need to remodel your systems to embrace entity models.

Industry Support

There may be lots of players in the Industry that are supporting Entity frameworks, but based on my current and recent work, two companies I must mention here.

Microsoft released ADO.NET based Entity framework and even made it easier to create those entity models from existing RDBMS tables. And almost every .NET project I have looked at recently is buzzing about DDD, ACL (Anti corruption layer) and Entity framework. LINQ is something can not be omitted, of course.

And Google App Engine doesn't support RDBMS abstraction but only support Entity models. (No JOIN support will force you to think different and prefer one over the other, whether you like it or not).

Update 02/19/2009: Google App Engine team explains the scalability reasons behind moving away from RDBMS and creating its own BigTable.

Back to the Future for Data Storage

Building a massive, distributed datastore which can service requests at an extremely high throughput is something that we've focused on at Google. We created something called Bigtable that underlies the datastore in App Engine. The design for Bigtable focused on scalability across a distributed system so it may operate a bit differently than databases you've worked with before, such as not supporting joins. This isn't an accident -- when you build a system that can scale to the size that Bigtable can there's no way to do a general purpose join on data sets that size and still have them be performant.

So does this mean the end of RDBMS abstractions?

As I said earlier, I don't see any reason to remodel existing systems. The abstraction in Entity models could still be carried out with existing Table models. And I am pretty sure RDBMS systems will stay for a longer time, as almost all data is currently stored in some form of RDBMS system. But abstractions for sure, may change.

Popular posts from this blog

You Are What You Think People Think About You

There are about 6.7 Billion people in this world that we know of.  Whether you believe in ‘Creation’ or ‘Evolution’, this human race started with a tiny number. It is quite amazing to see how fast it multiplies. What is more amazing is that every single individual in that 6 billion crowd is born ‘unique’.  Quite literally, you are born to be one in a billion, whether you believe it or not. “ This was the Introduction to my latest and last speech in Toast Masters club, ‘One in a Billion’ as part of International Speech contest. 
As much as I believe that each one of us can be that 'one in a billion' personality, I admit the reality as I perceive it and some times feel alone in that belief.
A famous quote says 'You are what you think'. It is also true that 'you are what you think people think about you'. If you think people think you are smart, then you act smart and become smart. If you think people think you are dumb, you will become dumb even if you are not, a…

Cooking looks like an unforgiving art

When you are writing software, you always get a second chance. In fact, lots of chances to get it correct. You have compiler warnings, failed test cases and some times crashes alert you that something is not right and will give you a chance to correct. And you get literally unlimited chances to apply those corrections. 
Well, cooking looks to be totally unforgiving in this respect and on any given day, you may get just one chance to get it right. If you fail, you fail. Try again right away if you have patience of starting it all over. Or start over some time later or next day. But not much of a second chance to correct a mistake. 
More ruthless, when it comes to salt. If you put just a little more, even a tiny little more, it never hesitate to show what it got. Totally ruthless. End result will be a failed dish that no one will be able (and/or happy) to eat. And most dishes, you may not be able to add something little more to offset it.

Little trick I learned the hard way, start on …

Did NDTV Just Twisted Words?

I have recently spotted quite a few places where NDTV title doesn’t exactly say the same as the details in the article says. Lost in translation? or just plain twisting for journalistic sensationalism?Title says “'AAP doesn't treat women as humans,' says founder member Madhu Bhaduri as she quits”, but the quote in details says, slightly differently: “In this party, women are not considered humans” (see the text highlighted).Source : NDTV.comYou may say, they effectually mean the same thing. Is it? Even if they mean the same,  Why not use the same exact phrase in both places?