|
Btrieve supports a maximum file size of approximately 64 GB, supports long file names, and supports three data file types:
Note
For users of earlier Btrieve versions, Pervasive.SQL can create files in 8.x and 7.x formats. These newer formats allow for enhancements and new features.
Pre-7 Btrieve cannot open version 7 or 8 files. However, Pervasive.SQL V8 can open pre-7.0 files. When Pervasive.SQL V8 opens pre-7.0 files, it does not convert the files to the 7.0 or 8.0 formats. Also, you can configure the Pervasive.SQL to create files using a pre-8.0 format. This may be useful if you want to use newly created files with pre-8.0 Btrieve engines.
A standard 7.0 or 8.0 file contains two FCR pages followed by a number of PAT pages, index pages, data pages, and possibly variable and ACS pages. You can create a standard file for use with either fixed- or variable-length records. Because standard files contain all the index structures and data records, Btrieve can dynamically maintain all the index information for the records in the file.
When you create a data-only file, you do not specify any key information, and Btrieve does not allocate index pages for the file. This results in a smaller initial file size than for standard files. You can add keys to a data-only file after creating the file.
Key-only files contain only FCR pages followed by a number of PAT pages and index pages. (In addition, if you have defined referential integrity constraints on the file, the file may contain one or more variable pages.)
Key-only files include only one key, and the entire record is stored with the key, so no data pages are required. Key-only files are useful when your records contain a single key and that key takes up most of each record. Another common use for a key-only file is as an external index for a standard data file.
The following restrictions apply to key-only files:
The MicroKernel supports file sizes up to 64 GB. However, many operating systems do not support single files this large. For example, the DOS operating system supports files up to 2 GB. In order to support files larger than the operating system file size limit, MicroKernel breaks up the large file into smaller files that the operating system can support. A large, logical file is called an extended file. The smaller, physical files that comprise an extended file are called extension files. The base file is an original data file that has become too large to support as a single, physical file.
The process of extending a file is transparent. When a base file surpasses 2 GB in size, the MicroKernel automatically makes it an extended file. (To ensure file portability across platforms, the MicroKernel allows a single base file or extension file to be no larger than 2 GB.) Extension files have the same name as their base file, except that the file name extension is a caret character followed by a hexadecimal sequence number (.^01, .^02, and so on, up to .^1F). An extended file can consist of a base file and up to 31 extension files. Base files and extension files must reside in the same location.
For information about backing up files, including extended files, refer to Backing Up Your Files .
The maximum file size depends on the page size. The MicroKernel uses a three byte integer to store the page number. So there can be up to 2^24, or 16,777,216 pages in an extended file. If the page size is 512, then the maximum file size is 512 x 16777216 = 8,589,934,592 or only 8 GB. In this case there would be a maximum of 4 x 2GB segments. Likewise, if the page size if 4096, the maximum file size is 64 GB, or 32 x 2GB segments.
Btrieve supports long file names whose length is less than or equal to 255 bytes. The following items must conform to this upper limit:
The file name cannot contain spaces unless the Embedded Spaces client configuration option is enabled. Use the Pervasive.SQL Control Center to adjust configuration settings.
When Btrieve generates new files based on an existing file name, such as with Large Files (page 4-10) or during Archival Logging or Continuous Operations (for more information, see Chapter 8, Logging, Backup, and Restore in Advanced Operations Guide), the new file name includes as much of the original file name as possible and an appropriate file extension, as in the following examples:
|
Original File Name
|
Generated File Name in Continuous Operation
|
|---|---|
|
LONG-NAME-WITHOUT-ANY-DOTS
|
LONG-NAME-WITHOUT-ANY-DOTS.^^^
|
|
VERYLONGNAME.DOT.DOT.MKD
|
VERYLONGNAME.DOT.DOT.^^^
|
|
Chapter contents
Prev topic: Pages
|