How to Estimate Size of Basic ISAM Database Components (69112)
The information in this article applies to:
- Microsoft Visual Basic for MS-DOS
- Microsoft Basic Professional Development System (PDS) for MS-DOS and MS OS/2 7.0
- Microsoft Basic Professional Development System (PDS) for MS-DOS and MS OS/2 7.1
This article was previously published under Q69112 SUMMARY
Using the output of ISAMPACK.EXE can give you a rough estimate of the
size of an ISAM database.
MORE INFORMATION
Because an ISAM file contains descriptive information, it has some
size overhead. This overhead is required for the speed and efficiency
that ISAM files possess compared to random access files. With this
overhead, data manipulation, such as searches, seeks, and sorts,
becomes extremely easy. The ISAM engine is responsible for all this
data manipulation, which allows you to spend your time developing the
code, and frees you from worrying about the fine details of the
database management.
You can use the output of the ISAMPACK.EXE utility to roughly guess
the size of the components of an ISAM database.
The ISAM database is divided into several components, which have the
following size requirements:
- The database requires a header of 3K for its own use.
- The system data dictionary requires 39K.
- Each table requires 4K of overhead beyond the data space.
- Each index is allocated in 2K chunks.
- Actual data is allocated in 2K increments.
Additionally, to optimize speed and flexibility, the file will grow in
large increments of 32K, rather than in record-size increments as
single records are added. For this same reason, the indexes and data
are allocated in 2K chunks. Although the files are quite large
compared to random access files, the ISAM file has room for growth and
can be extremely fast. This can be a hurdle for some programmers, and
is an important consideration when designing a program. Please read
"ISAM Componenets/When to Use ISAM" on Pages 101-102 of the "Microsoft
Visual Basic for MS-DOS: Professional Edition Features" manual, or
"ISAM Components/When to Use ISAM" on Page 329 of the "Microsoft Basic
7.0: Programmer's Guide" (for versions 7.0 and 7.1) to determine
which is more appropriate for your needs, ISAM files or random access
files.
The following tables were constructed using the sample database
AMAZRAYS.MDB and the output from ISAMPACK.EXE.
To run ISAMPACK.EXE, first invoke the PROISAMD.EXE TSR
(Terminate-and-Stay-Resident) program, then use the following
arguments for ISAMPACK.EXE:
ISAMPACK AMAZRAYS.MDB AMAZRAYS.RPT
More information on ISAMPACK.EXE can be found on Page 150 of the
"Microsoft Visual Basic for MS-DOS: Professional Edition Features"
manual, or on Page 394 of the "Microsoft Basic 7.0: Programmer's
Guide."
Header- Each database requires a 3K header. 3K
Data Dictionary- Five system tables and eight system indexes. 39K
Tables OverheadIndexesDatabaseDatabase Size- Growth is in 32K chunks.
Grand total(82K)... 83,968 bytes
Adjusted for 32K chunk (3 * 32K * 1024 bytes/K)... 98,304 bytes
Actual file reported after packing file... 98,304 bytes
Modification Type: | Minor | Last Reviewed: | 8/16/2005 |
---|
Keywords: | KB69112 |
---|
|