Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Original Thread to follow for Perl Code examples and initial discussion/description = http://www.perlmonks.org/?node_id=1121222

It has been pointed out that what I have referred to here on this thread as Joint Database Technology (Flat "text" Files/SDBM Files tied to Hash Tables) is really a type of NoSQL/ISAM (Indexed Sequential Access Method) technology.

The records in the Flat Files do not need to be maintained in a sorted record order either, although this may be beneficial for sequential access. For random access, it is not necessary. HOWEVER..YOU COULD sort the Keys in the hash table tied to any of the SDBM files used for random access indexing. Then process the unsorted Flat File in sequential order because you access each record randomly by the sorted KEYs.

What I have done recently which works well is to create an SDBM file with only the byte offsets stored which point to the first verse in each chapter of each book of the Bible. I also store the number of verses within each of those chapters in the SDBM file, so that I read the first verse of each chapter of each book randomly, then read the rest of the verses in a specific chapter sequentially from there. This makes the SDBM file much smaller in size since I am not storing a byte offset for every verse (but only the first verse in each chapter).

My latest enhancement has been to read an entire chapter of Bible verses in one(1) read statement execution, and use the unpack statement to break out each verse into an array for processing. This code enhancement (TreeView DblClick Event) was posted to this thread for the KJV Bible Navigator DEMO software posted here. DEMO refers to a demonstration of the Joint Database Technology technique, not that the Perl code posted here is only a DEMO of a more fully functional KJV Bible Navigtator software which might exist. This software is not for sale, but only provided to demonstrate the FlatFile/SDBM joint/dual/tandem database system technology technique within a useful application program. This code could be tweaked to make it display a database of Customers/Invoices/Items within a TreeView/RichEdit widget GUI user-interface. Or whatever data you like.


In reply to Re^3: Joint Database Technology by erichansen1836
in thread Flat File Database by erichansen1836

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2024-03-28 18:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found