in reply to Flat File Database
"...a new invention nobody has thought of?"
My first thought: Why don't you show an example?
Best regards, Karl
«The Crux of the Biscuit is the Apostrophe»
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Joint Database Technology
by locked_user erichansen1836 (Sexton) on Apr 11, 2015 at 15:58 UTC | |
Code example you have requested:
This Perl program retrieves 5 verses of King James Version Bible text
from a large Flat File (with fixed-length, "text" records) by random access lookup. (NOTE: Pls know we are not promoting any religion here. The KJV Bible was selected because it is in the public domain, and because it is logically segregated making it a good test file which can easily be copied over-and-over to fill up as many Flat Files as is desired for testing.) Dozens of Flat Files, each with 180 complete copies of the Bible, could be preloaded, and your application program designed to access any one of them based upon the different set of distinct bogus translation numbers (tr) contained within each Flat File (and its associated SDBM binary file tied to a hash table). Not shown here, was the initial code used to load the Flat File with records, and load the SDBM file with key/val pairs. To be clear: This "random access" technique requires no reading in of the Flat File records sequentially, nor does it require reading in rows/records sequentially from the binary SDBM file of key/val pairs - to load them into the Hash table. As soon as the below code is launched, the Bible verses are randomly accessed and printed to the screen in a split second.
| |
by karlgoethebier (Abbot) on Apr 12, 2015 at 20:04 UTC | |
Thank you very much erichansen1836 for providing your example. As you wrote, i requested it. So i take up this challenge and i hope very much that i don't make a fool of myself (because i'm really no database expert): "Random access lookup is instantaneous !!! FAST!" Very nice - if so. But unfortunately i can't verify/reproduce this because i don't have any data for benchmarking. And traditionally this effort is left to the author. I've been reading your code over and over again but i can't see any benefit for the moment. But as you may have noticed, i rely very much on my intuition. Some might say i guess sometimes. So i guess that it would be perhaps a good idea to read a bit about Star schema and all the related stuff you may find. Just an idea - and i hope it isn't misleading. Best regards, Karl «The Crux of the Biscuit is the Apostrophe» | [reply] |
by AnomalousMonk (Archbishop) on Apr 12, 2015 at 20:47 UTC | |
Please Update your post to use <c> ... </c> or <code> ... </code> tags around code, data and input/output. Please see Markup in the Monastery and Writeup Formatting Tips. Please do yourself (and your fellow monks) an enormous favor and use <code> tags in future. (Update: Note that just a single <c> ... </c> pair would have been sufficient rather than a million <p></p> paragraph tag pairs, and would have made the whole thing immediately downloadable, too!) Give a man a fish: <%-(-(-(-< | [reply] [d/l] [select] |