Click here to Skip to main content
15,880,427 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
what is the advantage & disadvantage of using multiple database in one application?
Posted

If you can write your code generic enough to replace one db with another, then this would add to the sale value of the application. One client can use, say, MySQL while another client can use SQL Server with the same application.

However, do this only when you think it is worth the effort. Writing an application to support multiple databases is a time consuming affair.

Also, if you want to do this, you should think about this upfront and then use a proper DAL layer with wrappers for each database. Changing the application later to support more Db's will be even more cumbersome.
 
Share this answer
 
Comments
Mehdi Gholam 14-Sep-11 1:45am    
My 5!
Abhinav S 14-Sep-11 5:40am    
Thank you!
Your question is too general to give a specific answer. It depends on what the databases do. I have cases where there is a project database (different for each project), supplemented by a database containing standard information. It would be a major hassle to combine them into a single database and copy the standard information every time we create a new project, not to speak of needless redundundancy.
 
Share this answer
 
v2
Comments
Mehdi Gholam 14-Sep-11 1:45am    
My 5!
Dr.Walt Fair, PE 14-Sep-11 10:21am    
Thanks!
Do you mean two databases simultaneously? Let me give a real world example.

I once worked for a company that supplied hospital software, which had two databases (both Oracle), one at regional level where things like GP and GP Practices were stored, and the other at hospital level where data specific to each hospital was held.

The criteria was - is this information likely to be duplicated across hospitals - if so manage it at regional health authority level, else hold it at hospital level.
 
Share this answer
 
Comments
Mehdi Gholam 14-Sep-11 1:45am    
My 5!
Yes there is advantage and also disadvantage there to use multiple db in single application...

the best thing is that your security is high when you use multiple database..

and the worst thing is that you have to manage both, so if any mistake there then it is big difficulty to solve this...
 
Share this answer
 
The general principal to keep in mind is don't make more work for yourself than is absolutely necessary.

Most clients and users don't care about how and where their data is stored unless it is safe and consistent. Rarely to client insist on using a specific type of database engine.

In rare cases, if you have invested the time and effort into supporting multiple db types then you are in the money and you have made the sale.

Usually multiple database type support is needed when licensing fees are prohibitive for clients or the application data has grown to outsize the database engine in question. There are many case studies where this has happened and is usually the case where you have been supporting your clients for a long time.

Multiple simultaneous instances of database engines, mostly make sense from your own support and maintenance staff requirements.

There are a lot of times where you are deploying your application in stages with each stage having a roll-out/tutoring/sign-off phases parallel to parts already working, and in these cases it is cost effective to have sample/test deployment databases where users are inputting and generally mucking about until the sign-off. Where it is much easier to delete the old database and create a new one than cleaning up old data.
 
Share this answer
 
Comments
Abhinav S 14-Sep-11 5:40am    
Good advice. 5.
Dr.Walt Fair, PE 14-Sep-11 10:21am    
Good answer.
Ger Hayden 14-Sep-11 14:38pm    
5 back!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900