Type database file format
|Stable release 7|
|License Commercial proprietary software|
The .dbf file extension represents the dBASE database file. The file type was introduced in 1983 with the introduction of dBASE II. The file structure has evolved over the years to include many more features and capabilities and has introduced various other files to help support data storage and manipulation. The current .dbf file level is called Level 7. The .dbf format is supported by a number of database products.
The original dBASE database was started by Wayne Ratliff in 1978 and was known as Project Vulcan. At the time the file that held the data was a simple table that could have data added, modified, deleted and printed using ASCII characters set. As the product became more popular, the underlying file type .dbf was expanded and additional files were added to increase the capabilities of the database system. Keep in mind that dBASE is an IDE (integrated development environment), a database system, a compiler, and a database application builder. However, underneath all that is the .dbf file, which is the actual data storage mechanism. If you want to understand the structure at a much lower level, review the Level 5 DOS headers section of this article.
File architecture overview
Project Vulcan (Level 1) There are no public records on the exact layout of the file the best information at this time is that it was a simple table that allows for adding, deleting, modifying, and printing out ASCII information. It was designed to run on 8-bit machine running CP/M.
dBASE II – MS-DOS (Level 2) was the first major release of Aston-Tate and offered many advancements above and beyond the simple table structure of the original tables found in Project Vulcan.
dBASE III – MSDOS (Level 2sh) was now completely focused on 16-bit operations and was introduced in 1.0 was released in June 1984. The underlying dBASE database was still based on an intermediate version of the dBASE II file format. The dBASE III file format is not compatible with the dBASE III+ format.
dBASE III+ – MS-DOS (Level 3) this starts the modern era of dBASE .dbf files. The dBASE III+ was introduced in December 1985 when the product was released.
Structure layout of the file type:
dBASE IV – MS-DOS (Level 4)'
dBASE V – MS-DOS (Level 5)
BDE – Borland Database Engine 2.52
This is the last update to the 16-bit version of the Borland Database Engine (BDE). Download and unzip to a temporary folder, and run the SETUP program.
dBASE V – MS-Windows (Level 5)
Level 5 DOS headers
While dBASE has been around for many years, the files themselves seem to be shrouded in mystery. Below is the structure of a database (.dbf) file for dBASE V for MS-DOS.
A database (.DBF) file is composed of a header, data records, deletion flags, and an end-of-file marker. The header contains information about the file structure, and the records contain the actual data. One byte of each record is reserved for the deletion flag.
Database header structure
The header structure, detailed in Table D.l and Table D.2, provides information dBASE for DOS uses to maintain the database file.
The records follow the header in the database file. Data records are preceded by one byte: a space (0x20) if the record is not deleted, or an asterisk (0x2A) if the record is deleted. Fields are packed into records without field separators or record terminators. The end of the file is marked by a single byte 0x1A.
You can input ASCII data as indicated in the following table.
Memo fields and the .DBT file
A memo (.DBT) file consists of blocks numbered sequentially (0,1,2, and so on). SET BLOCKSIZE determines the size of each block. The first block in the memo file, block 0, is the memo file header.
Each memo field of each record in the .DBF file contains the number of the block (in ASCII) where the memo field begins. If the memo field contains no data, the .DBF file contains blanks (0x20) rather than a number.
When data is changed in a memo field, the block numbers may also change, and the number in the .DBF may be changed to reflect the new location.
Unlike dBASE III PLUS, if you delete text in a memo field, dBASE for DOS may reuse the space from the deleted text when you input new text. dBASE IQ PLUS always appended new text to the end of the .dbt file. In dBASE III PLUS, the .DBT file size grew whenever new text was added, even if other text in the file was deleted.
dBASE 7 – MS-Windows (Level 7)
Level 7 tables
Level 7 brought many improvements. The field names can have up to 31 characters (from a maximum of 10 before). Some new fields types have appeared (for example, the auto-increment field that makes nearly impossible to give the same number to two records in the same table). If your tables have to be used by other software, you might have to sacrifice these advantages for the sake of compatibility, as few applications can use a level 7 table.
Level 7 structure
The Level 7 structure is the latest supported by dBASE and BDE.
BDE version 5.1.0
Significant improvements over the prior releases. There are also some limitations with regards to what the BDE can handle.
Other file types found in dBASE
There are many file types or files that have extensions that can be used by dBASE. The following list is presented in the order of use. This is a combination list of files that are related to dBASE and is compiled from the dBASE III+, dBASE IV, and dBASE CLASSIC documentation.