Re: btree on disk
"Natalia Shilenkova" <[email protected]>
| Newsgroups | gmane.text.xml.xindice.devel |
|---|---|
| Message-ID | <[email protected]> |
On 7/10/07, Cam Bazz <[email protected]> wrote: > Hello Natalia; > > If I were to put records inside a BTreeFiler in a way: > > > filer.writeRecord(new Key(somekeyvalue),new Value(somevalue)) > > and then search this filer based on somekeyvalue, would I have to use a > ValueIndexer? No, you do not need indexer for that. Searching by a key is the fastest way to find a record. ValueIndexer is used when you store XML and want to search data based on element/attribute values. > A typical operation is for adding nodes to a graph is: > > record r; > if(filer.readRecord(new Key(keysearched))==null) > { > r = new Record(new Key(keysearched), new Value(somevalue)); > filer.writeRecord (r); > } > else > { > r = filer.readRecord(new Key(keysearched)); > } > > it otherwords, I have to check if a graph contains a node n, if it does not > write a new node, and if it does retrieve the node. I need to be able to do > this very fast. I have tried object oriented dbms, although they worked > nicely for graph things, they were very poor at identity search. That would work. I would suggest to change it a bit, however, so the code does not read a record twice if key is found - retrieving data from file system is pretty expensive. > Any ideas, recomendations and help greatly appreciated, > -C.B. Natalia > > > On 7/9/07, Natalia Shilenkova <[email protected] > wrote: > > On 7/9/07, Cam Bazz <[email protected] > wrote: > > > Hello All, > > > > > > That was really helpful. Thanks. > > > > > > I also noticed FSFiler, and HashFiler. Are those for Indexing files? > > > > Xindice allows several way for the data to be stored. Currently it has > > BTreeFiler (based on tree-like structure), HashFiler (based on hash > > table), FSFiler (uses file system), MemFiler (in-memory), and > > SizableMemFiler (in-memory). A document collection can be configured > > to use any of those filers, depending on collection characteristics. > > > > Additionally, collection can have an index. There are 3 indexers in > > Xindice now: NameIndexer, ValueIndexer, and MemValueIndexer. > > > > > I am working on a graph database project. I have tried several oodbms, > and > > > finally decided to build my own. > > > > > > Also, could it be possible to use xindice as a backend for Jena? > > > > No idea, really. Never heard of Jena before. > > > > Regards, > > Natalia > > > >