Apr 15
An object by itself is intensely uninteresting.Objects contribute to the behavior of a system by collaborating with one another.One of relationship aspects between Objects can be represented by Association.
When we bring in Cardinality in Association we get One-to-One, One-to-Many and Many-to-Many.In later two One-to-Many and Many-to-Many we use Collection to represent many Side.For example: An Order have many OrderDetail’s.
We have these associations represented in Relational DBMS using foreign keys.So from any O-R framework we expect that to take care of these associations in smartest way possible.As these can easily become a performance bottle neck for the application.Some time you may end up loading lot of Data into memory, and sad part is you are never going to use them. Continue reading »
Mar 18
Simple Approaches for achieving Sync between two Databases of an application.
Introduction
Since the title of the article is quite vague, let me try to make it more specific. The main purpose of this article is to put down few of the simple approaches which can be chosen to build an offline version of an application. The article does not cover all areas for creating an offline application. Main idea here is to explain few of the approaches I came across or worked on, to sync two databases, where the tables between the two DBs are same and data needs to be transferred. The use case for such applications is when people want to create an offline version of their applications, which can run without internet for a while. Later they want to push and pull change to and from the server respectively. There are already off the shelf tools available to achieve DB sync, but mostly the issue with them is on customization effort. Therefore I wanted to put forward few of the simple things one can achieve programmatically with little effort to achieve the basic purpose. Remember cost of simplicity is mostly the complex scenario’s handling. Here also the approaches listed can help you achieve sync but may not work for every boundary case. Hence based on your requirements you might need to customize the given approaches further during your specific implementation.
The approaches listed down are neither exhaustive nor by any standards the best possible ways. But they can help achieve the purpose with least number of changes being made to the existing DB and will work in a practical scenario. Continue reading »
Recent Comments