连接多个数据库的最佳做法是什么? [英] What is the best practice to connect multiple Databases?

查看:76
本文介绍了连接多个数据库的最佳做法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好



我们有8个数据库和一个应用程序。我们必须从下拉列表中选择的数据库中获取详细信息或插入数据库。

我们有以下两个连接选项:

1.始终连接到singale数据库,然后使用选定的DBNAME.DBO.TableName来获取数据

2.直接连接到特定的选定数据库并获取记录。



任何人都可以建议哪种连接方式是正确的?


问候

Willington

Hi All

We have 8 databaes and one application. We have to fetch details from or insert to database which is selected in a dropdownlist.
We have the below two options to connect:
1. Always connect to singale database and then use selected DBNAME.DBO.TableName to fetch the data
2. Directly connect to the particular selected database snd fetch the records.

Could anyone suggest which is the correct way of connecting to a database?

Regards
Willington

推荐答案

hi,

第一个是最好的一个。如果你选择第二个,你可能会使用第一个选项。例如,您需要从db1和db2获取记录集,您必须再次使用第一个选项。我会建议第一个。



问候,

Prakash.T

First one is best one. if u go with second one, u may have use first option. For an example, you need get record set from db1 & db2, you have to use again first option only. I will suggest First one.

Regards,
Prakash.T


这篇关于连接多个数据库的最佳做法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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