将多个数据库合并为一个数据库 [英] Merge Multiple Databases into a Single Database
问题描述
所有,我必须创建一个具有基本架构的数据库.该数据库将很大(100GB 以上),将用作数据仓库.现在,该数据库的创建目前正在通过 C# 代码一击"执行;从许多不同的来源提取数据.由于数据量庞大,这种创作造成了一些问题.已经决定不是一次性创建单个数据库;
All, I have to create a single database which has a basic schema. This database is going to be large (100GB plus), and is to be used as a data warehouse. Now, the creation of this database is currently being performed in 'one-hit' through a C# code; pulling data from a number of different sources. Due to the sheer volume of data, this creation is causing some problems. It has been decided that instead of creating a single database in one go; to
- 创建几个包含核心数据表的小型数据库.
- 将较小的数据库合并为一个较大的数据库.
- 构建架构/添加相关约束.
我的问题有两个方面.
1.合并多个数据库(具有相同架构/表结构)的最佳方法是什么?
2.有没有更好的方法来创建这个数据仓库(超大数据库)?
感谢您的时间.
推荐答案
对于您的第一个问题:您提到了相同的架构和表结构,在这种情况下,它只是将数据从一个 DB 表(即较小的 DB)移动到另一个(即更大的数据库).为此必须保证
for your first question : You have mentioned identical schema and table structure, in that case, its simply moving of data from one DB table (i.e smaller DB) to another (i.e larger DB). for this have to ensure
1) 没有重复的数据(至少在 PK 领域)
1) there was no duplicate of data ( at-least in PK field )
2) 将数据从一个 db 移动到另一个 sql server 参考
2) move data from one db to another for sql server refer
这篇关于将多个数据库合并为一个数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!