Re: Indexing and Data Files
- Posted by Brian Jackson <bjackson at 2FARGON.HYPERMART.NET> Dec 27, 1999
- 494 views
> I am working on several projects that need database handling. My >question is this: Has anyone developed a library or set of routines for >file handling in a database, or do I need to write my own routines. What I >am in need of at this time is this: > > [Category] [Sub-Category] [Field1] [Field2] [Field3].....[FieldN] > > I need to have the DataBase indexed by Category and Sub-Category. For >example. <<SNIP>> Sadly nothing like this is being done in Euphoria. I do, however, happen to have a library for reading and writing fixed-length files, which sounds like it's part of what you will need. (I wouldn't have the foggiest idea of how to index a variable-length index) It is called fileman.e, and you can find on my website at http://2fargon.hypermart.net/. I did start work on a btrieve library for Eu, but it never came to fruition, mostly because I recoiled in horror at the thought of converting that many lines of C code... As a VERY simple index, you could make a file with room for two atoms tacked on to the end - one for a pointer to the previous record in the index, and a pointer to the next record in the index. You could then use those values to seek() to the next record in the index. It's not elegant, but it does work. I'm afraid that you'll end up having to "roll yer own" for most all of these I/O routines. I'm already streched pretty thin, but I'd be happy to help you out where I can. Brian