Results 1 to 2 of 2

Thread: A significant improvement of STSdb

  1. #1
    Junior Member
    Join Date
    Dec 2011

    Default A significant improvement of STSdb

    Viewing/editing the content of a STSdb table in a table editor or DataGridView is too complex now if the table is big, because STSdb does not support access to a specific key/value pair by its consecutive number from the first key/value pair. Adding CumulativeCount field in the WaterfallTree leaf could eliminate this disadvantage. Every node should contain the number of all key/value pairs in his specific tree branch. And it should be simple thing for you to do - you know your code.

  2. #2


    First of all, thank you for your suggestion. Principally, adding a cumulative count is always a good idea. It would allow accessing table records by their index, not only by their keys. This idea, however, cannot be applied so easy when the tree allows duplicate keys.

    From the WaterfallTree description we have:

    Unlike B-tree, the keys in W-tree can be duplicated. On its way from the root to the leaf certain key may appear more than once. These are the asynchronous operations with certain key - insert, replace, delete etc. Along their way they reach, replace and annihilate each other, until they reach the leaves. In the leaves the operations are cleared to records.

    In W-tree there are records everywhere - in all nodes, not only in the leafs. More accurate is to say, that the pure records are only in the leaf nodes, in the non-leaf nodes there are operations. Each operation is usually a triple - {code, key, record}, for example: {replace, 5, "a"}, {insertOrIgnore, 5, "b"}, {delete, 5} etc. Thus, operations with the same key may be found on one tree path in different by depth nodes.

    The situation is additionally complicated by the fact that in the current W-Tree implementation one W-tree instance contains all data from all tables - all keys and records. This allows, for example, very fast insert into thousands of different tables in parallel. (Probably, we will sacrifice this in the future, because it prevents us from implementing other improvements and more useful things.) But even if we separate the trees: one W-tree - one table, this will not allow us to make accessing records by index - it will only allow us to access operations by their index...

    Still, we will think about adding cumulative count carefully.
    Last edited by p.petkov; 04.12.2014 at 14:24.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
2002 - 2014 STS Soft SC. All Rights reserved.
STSdb, Waterfall Tree and WTree are registered trademarks of STS Soft SC.