在一个应用程序中使用多个数据库有什么优势? [英] Is there any advantage of using multiple DB in one application ?

查看:94
本文介绍了在一个应用程序中使用多个数据库有什么优势?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在一个应用程序中使用多个数据库的优点和缺点是什么?

what is the advantage & disadvantage of using multiple database in one application?

推荐答案

如果您可以编写足以将一个数据库替换为另一个数据库的代码,那么这将增加应用程序的销售价值.一个客户端可以使用MySQL,而另一个客户端可以将SQL Server与同一应用程序一起使用.

但是,仅当您认为值得努力时才执行此操作.编写支持多个数据库的应用程序非常耗时.

另外,如果您想这样做,则应该先考虑一下,然后为每个数据库使用一个带有包装器的适当DAL层.以后更改应用程序以支持更多Db将更加麻烦.
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.


您的问题过于笼统,无法给出具体答案.这取决于数据库的功能.在某些情况下,存在一个项目数据库(每个项目都不同),并辅之以包含标准信息的数据库.将它们组合到一个数据库中并在每次创建新项目时都复制标准信息是一件很麻烦的事情,更不用说多余的冗余了.
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.


您是同时表示两个数据库吗? ?让我举一个真实的例子.

我曾经在一家提供医院软件的公司工作,该公司有两个数据库(均为Oracle),一个数据库在区域级别存储GP和GP Practices之类的东西,另一个在医院级别存储每个医院的特定数据. br/>
标准是-该信息可能会在各个医院之间重复吗-如果是这样,则在区域卫生当局一级进行管理,否则在医院一级进行保存.
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.


这篇关于在一个应用程序中使用多个数据库有什么优势?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆