home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.databases
- Path: sparky!uunet!gatech!darwin.sura.net!spool.mu.edu!umn.edu!sys12.ortta.umn.edu!durai
- From: durai@ORTTA (Appadurai V.)
- Subject: Re: dbf format
- Message-ID: <durai.31@ORTTA>
- Sender: news@news2.cis.umn.edu (Usenet News Administration)
- Nntp-Posting-Host: sys12.ortta.umn.edu
- Organization: U of Mn
- References: <PPOH.92Aug28171027@amethyst.tcs.tufts.edu>
- Date: Wed, 9 Sep 1992 17:11:17 GMT
- Lines: 66
-
- There was a request for dbf and index formats:
-
- The following information is from Foxpro Developers Guide (Fox Software):
- (Appendix B)
-
-
- .dbf structure
-
- A database file is made up of a header record and data records. The header
- record defines the structure of a database and contains any other
- information related to the database. It starts at file position zero.
-
- The data records* follow the header, in consecutive bytes, and contain the
- actual text of the fields. The length of a record, in bytes, is determined
- by summing the defined lengths of all fields. Numbers in this file are
- represented in reverse bytes.
-
- Data File Header Record:
-
- Bytes Description
- 00 Foxbase+/dbase III+, without memo: 0x03
- with memo : 0x83
- Foxpro/dbase IV, without memo : 0x03
- Foxpro, with memo : 0xF5
- dbase IV, with memo : 0x8B
- 01-03 Last update (yymmdd)
- 04-07 Number of records in file
- 08-09 Position of first data record
- 10-11 Length of one data record (including delete flag)
- 12-31 Reserved
- 32-n Field subrecords**
- n+1 Header record terminator (0x0D)
-
- Field Subrecords***
-
- Bytes Description
- 00-10 Field Name (max 10 chrs - if less than 10, padded with null
- chr (0x00))
- 11 Data Type (C: Chr, N: Num, L: Logical, M: Memo, D: Date)
- 12-15 Displacement of field in record
- 16 Length of field (in bytes)
- 17 Number of decimal places
- 18-32 Reserved
-
- Notes
- * The data in the data file starts at the position indicated in bytes 08-09
- of the header record. Data records begin with a delete flag byte. If this
- byte is an ASCII space (0x20) the record is not deleted; if the first byte
- is an asterisk (0x2A) the record is deleted. The data from the fields named
- in the field subrecords follows the delete flag.
-
- ** The number of fields determines the number of field subrecords.
-
- *** Limitations on characters per record, max fields, etc are defined in the
- System Capacities section of the appendix.
-
-
- .idx format
-
- The manual deals quite comprehensively the different index formats. Please
- refer to the book for the discussion. < i might be violating copyright
- privileges here, if i reproduced the entire text, and secondly, its too
- lengthy a discussion. >
-
-
-
-