[REBOL] Re: possible data format ... Re: Re: dbms3.r 01
From: rgaither:triad:rr at: 15-Jan-2002 9:22
Hi All,
Here is my summary of file organization options for
a text db.
File Options -
1. Single file
Pro - Very easy to manage and relocate
Pro - Simple read logic
Con - Poor write performance
Con - Hard to read data mixed with schema
Con - Limited to small record counts
2. Schema, Data, and Index file
Pro - Provides clean content by purpose
Pro - Supports larger record counts
Pro - Still reasonable to manage and relocate
Con - Poor write performance
Con - Still somewhat limited in record counts
Con - Multiple file synchronization issues
3. Schema file, Data and Index files for each table
Pro - Provides clean content by purpose
Pro - Supports larger record counts
Pro - Moderate write performance
Pro - Moderate read complexity
Con - DB is made up of many files
Con - Multiple file synchronization issues
Variations -
1. Any of the above, changed records appended at end of file
Same as Joel's suggestion.
Pro - Improves write performance
Con - Complicates read logic and performance
Con - Harder to manually view data
1. Any of the above, changed records in a log file
Like Joel's suggestion but stored in a dedicated file.
Pro - Improves write performance
Pro - Provides place to implement limited transaction support
Con - Complicates read logic and performance
Con - Harder to manually view data
3. Any of the above, individual data operations in a dedicated file
Like the append changed records options but just recording
the action and new data. Field levels changes for updates
or record level changes for add and deletes.
Pro - Improves write performance even more
Pro - Provides place to implement limited transaction support
Con - Complicates read logic and performance
Con - Harder to manually view data
FWIW, Rod.
Rod Gaither
Oak Ridge, NC - USA
[rgaither--triad--rr--com]