User Tools

Site Tools


mbbsemu:development:btrieve_file_format

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Last revisionBoth sides next revision
mbbsemu:development:btrieve_file_format [2020/11/14 21:06] – created tudaymbbsemu:development:btrieve_file_format [2020/11/20 04:52] – [Btrieve File Format] paladine
Line 3: Line 3:
 MajorBBS/Worldgroup make use of Actian/Pervasive/Novell Btrieve as a native, persistent database platform.  MajorBBS/Worldgroup make use of Actian/Pervasive/Novell Btrieve as a native, persistent database platform. 
  
-In this article we'll be discussing the Btrieve File Format as reverse engineered in the course of developing MBBSEmu. +In this article we'll be discussing the Btrieve File Format as reverse engineered in the course of developing MBBSEmu. There is also an excellent book titled [Btrieve Complete, by Jim Kyle](https://books.google.com/books/about/Btrieve_Complete.html?id=_Vu8BaXMr4UC) which describes the file format is painstaking detail.
  
 # Assumptions # Assumptions
 * MajorBBS/Worldgroup used a version of Btrieve <= 6.0 * MajorBBS/Worldgroup used a version of Btrieve <= 6.0
-* MajorBBS/Worldgroup did not make use of Variable Length Records 
 * MajorBBS/Worldgroup did not make use of Compressed Fields * MajorBBS/Worldgroup did not make use of Compressed Fields
  
Line 53: Line 52:
 ----------|------|------------| ----------|------|------------|
 Duplicates | `1` | Allow duplicate key values  Duplicates | `1` | Allow duplicate key values 
-Modifiable | `1 << 1` | Value can be modified +Modifiable | `1 << 1` | Key Value can be modified 
-Old Style Binary | ` 1 << 2 ` | Unknown +Old Style Binary | `1 << 2` | Used when `UseExtendedDataType` is not set. If true, binary blob, otherwise string. 
-Null0 | `1 << 3` | Unknown+NullAllSegments | `1 << 3` | Whether the key supports null values. All segmented keys must have this same bit set.
 SegmentedKey | `1 << 4` | If the given key has any Segments SegmentedKey | `1 << 4` | If the given key has any Segments
-NumberedACS | ` 1 << 5` | Unknown+NumberedACS | ` 1 << 5` | Whether the string type uses the ACS table
 DescendingKeySegment | ` 1 << 6` | Key is stored in descending Sort Order DescendingKeySegment | ` 1 << 6` | Key is stored in descending Sort Order
-SupplementalKey | `1 << 7` | Unknown+RepeatingDuplicatesKey | `1 << 7` | Different representation of duplicate key values 
 +UseExtendedDataType | `1 << 8` | Whether the key uses the key data types listed below, otherwise type is defined by `Old Style Binary`. 
 +NullAnySegment | `1 << 9` | Whether the key supports null values. Any segmented key with this value set indicates the entire key could be null.
  
 ### Key Data Types ### Key Data Types
Line 94: Line 95:
 Page Type | Definition | Page Type | Definition |
 ----------|------------| ----------|------------|
 +FCR | Contains metadata about the entire database
 +ACS Page | Contains the ACS table used by the database
 Key Page | Contains the absolute offset in the Btrieve file for the specified Key value Key Page | Contains the absolute offset in the Btrieve file for the specified Key value
-Key Constraint Page | Unused by MBBSEmu 
 Data Page | Contains record data Data Page | Contains record data
 +Variable Record Data Page | Contains variable record data
  
 While enumerating through the pages, the best method we've been able to employ to identify Page types is the following: While enumerating through the pages, the best method we've been able to employ to identify Page types is the following:
Line 103: Line 106:
 Page Type | How to Identify | Page Type | How to Identify |
 ----------|------------| ----------|------------|
 +`FCR` | Always first page
 +`ACS Page` | Always second page if exists. Starts with 0x000001000000AC
 `Key Pages` | Value `0xFFFFFFFF` at offset `0x8` `Key Pages` | Value `0xFFFFFFFF` at offset `0x8`
-`Key Constraint Pages` | Value `0xAC` at offset `0x6` 
 `Data Pages` | Bit 7 set in the byte at offset `0x5` `Data Pages` | Bit 7 set in the byte at offset `0x5`
 +`Variable Record Data Pages` | No identifying information. Referenced via pointers inside the `Data Pages`
  
 # Understanding How MajorBBS/Worldgroup uses Btrieve # Understanding How MajorBBS/Worldgroup uses Btrieve
Line 152: Line 157:
 It would return the `Previous` record, which in our query would mean the user with the _second_ highest `userId` It would return the `Previous` record, which in our query would mean the user with the _second_ highest `userId`
 </markdown> </markdown>
 +n>
mbbsemu/development/btrieve_file_format.txt · Last modified: 2023/10/06 23:41 by 127.0.0.1