通用数据库备份/提取格式

发布于 2024-08-07 12:28:05 字数 344 浏览 3 评论 0原文

是否存在通用的数据库备份/提取格式?

我将解释我的出发点:我们的应用程序支持多个数据库供应商: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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

温柔少女心 2024-08-14 12:28:05

仅供参考:最后我决定使用 SQLite 作为我们的格式。这样做有几个原因:

  1. 使用单个文件,这对于传输来说非常方便。
  2. 支持我们需要的所有字段类型。
  3. 支持多种平台和语言。
  4. 是开源且免费的。
  5. 占地面积小。
  6. 附加记录非常快。
  7. 我们的应用程序可以直接与 SQLite 数据库对话。

第 7 点绝对是关键,因为当我们从客户那里恢复备份(或提取)时,我们不必恢复它,而是可以直接连接到它。

FYI: In the end I settled on using SQLite as our format. There we several reasons for this:

  1. Uses a single file which is very handy for transport.
  2. Supports all of the field types that we require.
  3. Has support for many platforms and languages.
  4. Is open-source and free.
  5. Small footprint.
  6. Very fast for appending records.
  7. Our applications can talk directly to SQLite databases.

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.

缱绻入梦 2024-08-14 12:28:05

唯一的通用导出格式是文本转储主题的一些变体。

有多种可能的格式 - 固定或分隔(或分隔)。
分隔后,它可以是 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.

我是有多爱你 2024-08-14 12:28:05

XML 怎么样? CSV?

How about XML? CSV?

⒈起吃苦の倖褔 2024-08-14 12:28:05

我所知道的所有 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.

心作怪 2024-08-14 12:28:05

我认为你必须寻找一个可以泵送数据的工具。

这里有一个例子: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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文