Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: possible data format ... Re: Re: dbms3.r 01

From: cribbsj:oakwood at: 15-Jan-2002 10:06

Rod Gaither wrote:
>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] >
Just FYI, but I contributed a script to the library (I think it is called db.r) that provides some pretty simplistic db routines for maintaining a single file db. It addresses some of the wishlist items posted on this topic. The code is pretty ugly, but it is functional and fairly speedy as long as the files don't get too big. Also, during the development of the script, I corresponded with Tim Johnson a lot. He was working on something similar for a client. He had some great ideas and code that we were looking to incorporate in my script, but I got sidetracked with other stuff. Jamey Cribbs