通用数据库备份/提取格式
是否存在通用的数据库备份/提取格式?
我将解释我的出发点:我们的应用程序支持多个数据库供应商:DB2、MsSql、MySql 和 Oracle。目前,当我们向客户请求备份时,他们必须以供应商特定格式进行完整备份。
我们有一个小型但功能强大的自制实用程序,它允许我们从任何数据库供应商完全或部分导入和导出。不幸的是,常见的提取格式是 dBase 表,它不能很好地工作,因为我们现在使用不支持的 SQL 字段类型。
解决方案是使用现有的行业标准备份/提取格式(如果存在)。虽然我不介意发明自己的格式,但行业标准格式会有更多可能性。
是否存在或者我必须发明一个?
预先感谢,
斯蒂芬。
does there exist a universal database backup/extract format?
I'll explain where I'm coming from: our application supports several database vendors, DB2, MsSql, MySql and Oracle. Currently when we request a backup from a customer they must make a full backup in the vendor specific format.
We have a small but powerful homegrown utility which allows us to import and export fully or partially from any database vendor. Unfortunately the common extract format is dBase tables which does not work very well as we are now using SQL field types that are not supported.
The solution is to use an existing industry standard backup/extract format, if one exists. While I don't mind inventing my own format an industry standard format would have more possiblities.
Does one exist or will I have to invent one?
Thanks in advance,
Stephen.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
仅供参考:最后我决定使用 SQLite 作为我们的格式。这样做有几个原因:
第 7 点绝对是关键,因为当我们从客户那里恢复备份(或提取)时,我们不必恢复它,而是可以直接连接到它。
FYI: In the end I settled on using SQLite as our format. There we several reasons for this:
Number 7 was definitely the clincher as when we recover a backup (or extract) from a customer we do not have to restore it but can just connect to it directly.
唯一的通用导出格式是文本转储主题的一些变体。
有多种可能的格式 - 固定或分隔(或分隔)。
分隔后,它可以是 CSV 或其他相关格式。
转义约定,尤其是嵌入式换行符,往往是特殊的。
另一个棘手的部分是不同的 DBMS 如何对二进制数据 BLOB 值之类的内容进行编码 - Base64、十六进制,...可能还有其他一些...
XML 也是一种可能性,但是对于使用哪种 XML 模式或 DTD 没有标准化使用。
The only universal export format is some variation on the theme of a text dump.
There are multiple possible formats - fixed or delimited (or separated).
When delimited, it can be CSV or some other related format.
Escape conventions, especially for embedded newlines, tend to be idiosyncratic.
Another tricky part is how the different DBMS prefer to encode things like binary data BLOB values - Base64, hex, ...and probably some others...
XML is also a possibility, but there is no standardization on which XML schema or DTD to use.
XML 怎么样? CSV?
How about XML? CSV?
我所知道的所有 DBMS(包括您列出的所有 DBMS)都支持导出和导入到 CSV 。
为了获得奖励积分,压缩导出以节省空间。
All the DBMS I know of (including all the ones you've listed) support exporting and importing to CSV.
For bonus points, compress the exports to save space.
我认为你必须寻找一个可以泵送数据的工具。
这里有一个例子:http://www.clevercomponents.com/products/datapump/ibdatapump。 asp
它不会特别适合您的需要,但可能是正确的选择。
I think you have to look for a tool who can pump data.
One example here : http://www.clevercomponents.com/products/datapump/ibdatapump.asp
It will not specifically fit your need but may be it is the way to go.