Universal Database Backup / Extract Format
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开发者_Go百科 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.
FYI: In the end I settled on using SQLite as our format. There we several reasons for this:
- Uses a single file which is very handy for transport.
- Supports all of the field types that we require.
- Has support for many platforms and languages.
- Is open-source and free.
- Small footprint.
- Very fast for appending records.
- 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.
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.
How about XML? 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.
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.
精彩评论