Thursday, May 6, 2010

Relation Decoupling -- Migrate from Relational Database to Non Relational Cloud Database


Relation decoupling problem

When doing the migration, there are lots of complex join/ cross table selection query, or views which implemented by such kind of query

Possible solution:

1) To migrate such kind of data, seems we need to re-model the database, get rid of the relation in the database, and move these kind of logic to be application logic (code implementation).

Similar to Ruby On Rails, they handle all the relation in coding logic, database level relation is not a must.

2) Pre-Process relation, and keep all these result in database, when certain query come, server can return data right away.

This approach looks like some kind of data warehouse. Which might only suitable for application only do read action mostly.

But it doesn`t mean we cannot do write action.

We can ask the application direct request to another server which particularly  design for writing data.

The only drawback is that, the result might not be able to display in a instance manner.  It depends on how agile my “Process Engine” can be.