> > ... > > More than once in this forum it was pointed out that Leo's outline is like > a database. Let us accept this analogy for now and let me use some database > terminology. > > At the moment Leo keeps its data in the form of interconnected VNode > instances. The result of reading outline is an array of VNodes which > represent the top-level nodes in the outline. Their parent node is > hiddenRootNode. To change the outline it is quite easy, just insert/append > or remove VNode instance from the array of v.children or v.parents. That is > all that you have to do in order to change the outline. That is very > efficient operation that can't be any faster. > > In the database world all data is kept in tables. Appending to the table > is quite fast. Inserting and deleting from the table is also very fast > operation. However, retrieving the data from database table can be > sometimes slow. To speed up queries one usually needs to add some index to > the database. Imagine searching for the owner of the specific phone number > in a phone book, or for a specific word in a book. To find all occurrences > one must read whole book. But if the book has word index at the end, it is > very easy to look for a specific word. Also looking for a someones phone > number in a phone book is easy if you know first and last name of the > person. Adding suitable index to the database makes some queries that can > use this index quite faster. On the other hand, every index added to > database, slows down all inserts and deletes. The job of database designer > is to make an optimal set of indexes so that all critical queries can >
Just in case you didn't know I would like to point out that there are other database alternatives, among others one that I only discovered some weeks ago (there is so much going on in the software world). It would be pretty easy to implement a DAG in a graph database: http://tinkerpop.apache.org/ And the very readable tutorial: http://kelvinlawrence.net/book/Gremlin-Graph-Guide.html#samplesintro You might want to have a look before moving forward. Reinhard -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
