English 中文(简体)
DOS Database - help needed to recognize what is it
原标题:
  • 时间:2009-11-13 22:01:13
  •  标签:
  • database
  • dos

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:

http://www.2shared.com/file/9137583/f840f261/WCENNIK.html

问题回答

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

file [filename]

from the command line.

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.

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.





相关问题
what is wrong with this mysql code

$db_user="root"; $db_host="localhost"; $db_password="root"; $db_name = "fayer"; $conn = mysqli_connect($db_host,$db_user,$db_password,$db_name) or die ("couldn t connect to server"); // perform query ...

Users asking for denormalized database

I am in the early stages of developing a database-driven system and the largest part of the system revolves around an inheritance type of relationship. There is a parent entity with about 10 columns ...

Easiest way to deal with sample data in Java web apps?

I m writing a Java web app in my free time to learn more about development. I m using the Stripes framework and eventually intend to use hibernate and MySQL For the moment, whilst creating the pages ...

join across databases with nhibernate

I am trying to join two tables that reside in two different databases. Every time, I try to join I get the following error: An association from the table xxx refers to an unmapped class. If the ...

How can I know if such value exists in database? (ADO.NET)

For example, I have a table, and there is a column named Tags . I want to know if value programming exists in this column. How can I do this in ADO.NET? I did this: OleDbCommand cmd = new ...

Convert date to string upon saving a doctrine record

I m trying to migrate one of my PHP projects to Doctrine. I ve never used it before so there are a few things I don t understand. In my current code, I have a class similar to this: class ...

热门标签