为什么只有链接表的MS Access数据库文件的大小可与父数据库相比? [英] Why is a MS Access database file with only linked tables comprable in size to the parent database?

查看:63
本文介绍了为什么只有链接表的MS Access数据库文件的大小可与父数据库相比?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在分析由离开组织的人员创建的MS Access 2010数据库文件.一个文件中的所有表,称为"Beta.accdb",是指向另一个数据库文件中的表的链接(称为"Alpha.accdb").我已经验证过,当我在Alpha中更新数据时,在打开Beta版时它会自动显示更新的数据.这以及我在网上找到的参考资料表明,在Beta中设置的实际上是真实的链接,而不是副本.

I am analyzing MS Access 2010 database files that were created by a person who has left the organization. All of the tables in one file, call it "Beta.accdb", are links to tables in another database file (call that one "Alpha.accdb"). I have verified that when I update data in Alpha, it automatically shows the updated data when I open Beta. This, and the reference material I found online, suggests that what was set up in Beta is in fact a true link rather than a copy.

但是,当我查看Beta.accdb的文件大小时,它几乎与Alpha.accdb的文件大小一样大.如果只包含引用并且实际数据继续存在于Alpha中,我希望文件Beta会小得多.类似的大小表明Beta拥有Alpha中数据的副本.

However, when I look at the file size for Beta.accdb, it is nearly as large as the file size for Alpha.accdb. I would expect file Beta to be much smaller if it simply contained references and the actual data continued to live in Alpha. The similar size suggest that Beta holds a copy of the data in Alpha.

是这样吗,还是有其他事情发生?如果Beta中有数据的副本,那么是否存在关于两个文件之间的数据自动同步的任何隐藏陷阱",还是依靠内置的Access同步方法安全吗?

Is that in fact the case, or is something else going on? If there is a copy of the data in Beta, is there any hidden "gotcha" regarding automatic synchronization of the data between the two files, or is it safe to rely on the built in Access synchronization method?

推荐答案

除非使用应用程序对象.

MS Access databases do not recoup previously used space unless requested to do so either using the Compact & Repair Database option, or by using the VBA CompactDatabase method of the DBEngine object, or the CompactRepair method of the Application object.

在执行查询时,即使使用从链接表中获得的数据,MS Access也会在数据库内分配空间来处理查询所引用的数据-这就是为什么您仍然会遇到2GB硬MS Access数据库的原因尝试合并链接表中的两个数据集时的大小限制,如果存储在单个数据库中,则大小限制将超过2GB.

When you execute queries, even using data sourced from linked tables, MS Access will allocate space within the database with which to manipulate the data referenced by the query - this is why you'll still run into the hard 2GB MS Access database size limit when attempting to union two datasets from linked tables which would otherwise exceed the 2GB limit if stored in a single database.

这篇关于为什么只有链接表的MS Access数据库文件的大小可与父数据库相比?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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