DOS 数据库 - 需要帮助来识别它是什么
今天我得到了一个旧系统的副本,我需要从中导入数据。该系统用C语言编写,运行在DOS下。它使用某种数据库。文件格式看起来相当简单(1个文件=1个表,标题包含一些描述,然后记录,字段由0个ASCII字符分隔,但它并不像看起来那么简单)。
问题是:如何识别使用的是什么数据库?
有没有可以打开多种格式的软件?
或者有什么软件可以帮助我吗?
或者有任何描述 dos 数据库的网站的链接吗?
或者任何可以提供帮助的东西都会受到赞赏:)
PS>如果有人想尝试猜测,我可以从数据库发布一些小文件。
一个小数据库文件:
today I got a copy of an old system from which I need to import data. The system is written in C and runs in DOS. It uses some kind of database. The file format seems to be rather simple(1 file = 1 table, header contains some description and then records, fields are delimited by 0 ASCII character, but it's not that simple as it seems).
The question is: how to recognize what database is used?
Is there any kind of software that maybe opens many formats?
Or is there any software that could help me?
Or any links to sites describing dos databases?
Or just anything that can help will be appreciated:)
PS> I can post some small files from the db if anyone wants to try guessing.
One small db file:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
几乎每个版本的 Unix(包括 Linux 和 Mac OS)都有一个名为“file”的命令,它可以根据内容识别大量文件类型。尝试将其中一个数据文件复制到 Mac OS 或 Linux 计算机并
从命令行运行。
Almost every version of Unix including linux and Mac OS has a command called "file" that recognizes a huge range of file types by their content. Try copying one of the data files to a Mac OS or Linux computer and running
from the command line.
大多数旧的平面文件应用程序使用专有(即非标准)格式。如果数据库是标准格式,您应该在标题附近看到某种标识符,告诉您它是什么。
如果您无法通过在十六进制编辑器中目视检查文件来确定格式,那么最好的选择是跟踪读取每条记录的 C 代码并对格式进行逆向工程。
Most of those older flat-file apps used proprietary(ie, non-standard) formats. If the db is a standard format, you should see some kind of identifier close to the header that tells you what it is.
If you can't determine the format by visually inspecting the file in a hex editor, your best bet is to trace through the C code that reads each record and reverse-engineer the format.
对我来说听起来像是 dBase 文件。它们很常见。 DBF 不必出现在标题中。请参阅此处的格式说明:
http://www.dbase.com/knowledgebase/int/ db7_file_fmt.htm
编辑更好的链接:
http:// /www.clicketyclick.dk/databases/xbase/format/
第一个字节的值是多少?
我刚刚仔细检查了我手头的一些 DBF 文件,它们的标头中没有 DBF。
Sounds like a dBase file to me. They were very common. It's not necessary for DBF to appear in the header. See the format description here:
http://www.dbase.com/knowledgebase/int/db7_file_fmt.htm
edit Better link:
http://www.clicketyclick.dk/databases/xbase/format/
What's the value of the first byte?
I just double checked some DBF files that I have on hand and they do not have DBF in the header.
原来的应用程序可以正常运行吗?稍微研究一下,您可能会找到导出数据的方法。另一件可以尝试的事情是将应用程序报告“打印”到文本文件。
Is the original application functional? Poke around a bit, and you may find a way to export the data. Another thing to try is to "print" application reports to text file.