This has been a most insightful conversation!
I think you've already answered most of my questions (and more importantly, potential questions). I would appreciate any advice you have on the following structure of events, but I think I'm almost ready to begin.
So the basic structure of the database (from one perspective) would go something like this:
- Database is laid out in a hierarchal directory design. Tables are files on the disk with meta data stored elsewhere (preferably on a separate disk) possibly mirroring the hierarchal structure of the data dir tree.
- Files are (naturally) binary in nature, the exact representation of the data types shall be determined after much googleage and jolt consumption. (I'm still a little fuzzy on how to separate records in the data file - can I just a fix row length in the meta files and go by that?)
- As for reading data from the disk as fast as possible - any last tips on caching to ram? As I see it, try to determine the most used data and ensure it's always in ram. For the small dbs I'm planning on building at first it won't be a problem to load the entire database into ram.
- Seeking specific data from a file - determine applicable fields, iterate over them checking their contents, return the matching results. Any last performance tips here?
This might just be random ramblings at this point, I think you've pointed me in the right direction now. Thanks again for all the help! :)
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.