EP1208479A1 - Verfahren zum organisieren von verzeichnissen - Google Patents
Verfahren zum organisieren von verzeichnissenInfo
- Publication number
- EP1208479A1 EP1208479A1 EP99933107A EP99933107A EP1208479A1 EP 1208479 A1 EP1208479 A1 EP 1208479A1 EP 99933107 A EP99933107 A EP 99933107A EP 99933107 A EP99933107 A EP 99933107A EP 1208479 A1 EP1208479 A1 EP 1208479A1
- Authority
- EP
- European Patent Office
- Prior art keywords
- index
- data
- key
- node
- link
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Withdrawn
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2228—Indexing structures
- G06F16/2246—Trees, e.g. B+trees
Definitions
- This invention relates to databases and database management systems, in particular for organizing directories
- a database system is a collection of interrelated data files, indexes and a set of programs that allow one or more users to add data retrieve and modify the data stored in these files.
- the fundamental concept of a database system is to provide users with a so called “abstract” and simplified view of the data (referred to also as data model or conceptual structure) which exempts a conventional user from dealing with details such as how the data is physically organized and accessed.
- relational model Other concepts introduced by the relational model are high level operators that operate on tables (i.e., both their parameters and results are tables) and comprehensive data languages (now called 4th generation languages) in which one specifies what are the required results rather than how these results are to be produced.
- Such non-procedural languages SQL - Structured Query Language
- SQL - Structured Query Language have become an industry standard.
- the relational model suggests a very high level of data independence. There should not be any effect on the programs written in these languages due to changes in the manner data are organized, stored, indexed and ordered.
- the relational model has become a de-facto standard for data analysts.
- Network Model - In the relational model, data (and relationship between data) are regarded as a collection of tables. In distinction therefrom in the network model data are represented as a collection of records whereas relationship between the records (data) are represented as links.
- a record in the network model is similar to an "entity" in the sense that it is a collection of fields each holding one type of data.
- the links may be effectively viewed preferably (but not necessarily) as pointers.
- a collection of records and the relation therebetween constitutes a collection of graphs.
- Hierarchical Model resembles the network model in the manner that data and relations between data are treated, i.e. as records and links. However, in distinction from the network model, the records and the relations between them constitute a collection of trees rather than of arbitrary graphs.
- the structure of the Hierarchical Model is simple and straightforward particularly in the case that the data that needs to be organized in a database are of inherent hierarchical nature.
- the hierarchical model has some inherent shortcomings, e.g. in many real life scenarios data cannot be easily arranged in hierarchical manner. Moreover, even if data may be organized in hierarchical manner, it may require larger volumes as compared to other database models.
- the object-oriented approach views all entities a objects.
- Each object belongs to a class, with each class there are associated methods and fields.
- the fields are private, accessible only to methods of the class while others are public accessible to all.
- “Joe Smith” belongs to the class of persons.
- the private fields age can be defined.
- Applying the class method update_age() to the object Joe will change his age.
- the methodology allows to define sub-classes which inherit all the methods and fields of the super-class.
- the employee class can be defined as a subclass of the person class.
- one may define additional fields and methods to the subclass.
- the employee class could support a salary field, and the get_raise ( ) method.
- Object Relational Model allows an object view on relational-organized data. Thus, one is able to operate on the data as if it is organized as objects and at the same time, support the relational approach.
- data models deal with the conceptual or logical level of data representation and "hide” details such as how the data are physically arranged and accessed.
- the latter characteristics are normally dealt with by a so-called database file management system.
- the database file management system maps the logical structure (in terms of database model) to a data structure, pertinent operations and possibly other data.
- the data structure includes index and data records.
- the index enables accessing or updating the data records by a key.
- search key is used.
- Database file management system should preferably operate on the data records so as to accomplish enhanced performance in terms of time (i.e. from the user's standpoint fast response time of the database), and space (i.e. to minimize the storage volume that is allocated for the database files).
- time i.e. from the user's standpoint fast response time of the database
- space i.e. to minimize the storage volume that is allocated for the database files.
- the performance of the database depends on the efficiency of the data structures that are used to represent the data and how efficiently the system can operate on these data.
- a detailed discussion on conventional file and management systems is given for example in Chapters 7 (file system structure) and 8 (indexing ) in "Database System Concepts", ibid.
- Known database file management systems typically utilize the following indexing schemes, which fall into the following main categories that include: Multi-way trees indexes and others.
- Multi-way trees indexes- These techniques can be used to create a one or more access paths (referred to also as search paths) to the same data record.
- the search paths form a multi-way tree.
- Its main disadvantages are that it requires space (usually all the keys to the records plus some pointers) and maintenance (addition and/or deletion of keys whenever an update transaction (see definition below) occurs i.e. record is added and/or deleted.
- the nature of the indexing scheme as well as the volume of the data held in the files determine the number of accesses that are required to find or update (update encompasses, insert, delete or modify) a given data record.
- the storage medium under consideration is an external memory, the number of accesses is effectively the number of I/O accesses.
- a block of data is loaded into the memory.
- Trie indexing scheme An example of the latter is the trie discussed in G. Wiederhold, “File organization for Database design”; Mcgraw-Hill, 1987, pp. 272, 273, or in D.E. Knuth, “The Art of Computer Programming”; Addison- Wesley Publishing Company, 1973, pp. 481-505, 681-687.
- the trie indexing scheme enables a rapid search whilst avoiding the duplication of keys as manifested for example by the B tree technique.
- the trie indexing scheme has the general structure of a tree wherein the search is based on partitioning the search according to search key portions (e.g. search key digit or bit).
- search key portions e.g. search key digit or bit.
- each node in the trie indexing file represents an offset of the search key and the link to any one of its children represents the character's value at said offset.
- the trie structure affords efficient data structure in terms of the memory space that is allocated therefor, since, as specified before, the search-key is not held, as a whole, in internal nodes and hence the duplication that is exhibited for example in the B -tree indexing technique is avoided.
- a trie indexing file should be built by selecting the digits (or bits) from the search key such that the best possible partition of the search space in obtained, or in other words so as to accomplish a tree which is as balanced as possible.
- This requires a priori knowledge of the data records of the trie and is accomplished at the penalty of obtaining an unsorted data, which in many real-life scenarios is inapplicable. It is noteworthy that if sorted data is mandatory, a balanced structure can not be guaranteed even if there is sufficient a prioiri knowledge of the data records of the trie. It should be noted that the specified trie does not support sequential sub-range processing.
- the specified B-tree indexing scheme constitutes an inherent balanced tree structure, even after the tree has been subject to update transactions.
- the inherent balanced (or essentially balanced) structure is accomplished, however, and as explained above, at the penalty of inflating the contents of the blocks in the tree and, consequently, unduly increasing the file size that holds the index, particularly insofar as large trees which hold multitude of data records are concerned.
- the large volume of the files adversely affects the performance of the data management system in terms of number of accesses (and consequently in terms of accessing time) to the storage medium in order to reach a sought data record, which is obviously undesired.
- the index scheme includes here three index files. This obviously poses undesired overhead insofar as data volumes and additional integrity maintenance and checking are concerned. Thus, for example, removal of a given book from the book file requires a preliminary test to inquire whether it exists in the borrower-book index file.
- Block - a storage unit which can be accessed by a single I/O operation.
- a block may contain data arranged in any desired manner, e.g. nodes arranged as a tree and possibly also links to actual data records.
- a block may reside in main (referred to also as internal) or secondary (referred to also as external) storage.
- Tree - a data structure which is either empty or consists of a root node linked by means of d (d ⁇ O) pointers (or links) to d disjoint trees called subtrees of the root.
- the roots of the subtrees are referred to as children nodes of the root node of the tree, and nodes of the subtrees are descendent nodes of the root.
- a node all the subtrees of which are empty is called a leaf node.
- the nodes in the tree that are not leaves are designated as internal nodes.
- leaf nodes are also nodes that are associated with data records.
- tree encompasses also a tree of blocks wherein each node constitutes a block.
- descendent blocks of a said block are all the blocks that can be accessed from the block.
- association e.g. link
- association encompasses any realization, which enables to access data records from leaf nodes.
- a data record may be accessed directly (i.e. through pointer) from the leaf node.
- the leaf node points to data structure, (e.g. a table) which, in turn, enables to access data records.
- data structure e.g. a table
- Depth of an index - is defined as the maximum number of blocks from a root block to a block associated with a data record.
- Balanced Index - An index is balanced if there exists a constant c such that the number of accesses needed to reach any data record is at most clogn , where n is the number of records in the structure.
- Obtaining a balanced tree encompasses, applying balancing technique, post factum, (on an unbalanced structure), bringing about a balanced structure, or, if desired, applying the balancing technique on the fly, so as to maintain, a balanced balanced structure.
- Accessing in an index would be considered as a process of moving from a node to another node within a block or to another block usually, although not necessarily, in order to reach sought data records.
- Navigating is considered as accessing data records, usually (although not necessarily), in order to collect them in an ordered manner by their key.
- Search scheme meaning the algorithm that is associated with an index that is used for accessing a given data record by key; intra-block search scheme meaning the algorithm that is used inside the block for accessing a given data record or another block.
- the data record is not necessarily accommodated within said block.
- the common key of a block is the longest prefix of all keys of the data records that can be accessed from the block by the relevant search scheme. If desired, part or all of the common key may be held explicitly in the block.
- Update transactions - transaction consisting of either inserting a new data record, or deleting an existing data record or modifying an existing data record or portion thereof .
- the trie that is susceptible to an unbalanced structure constitutes a vertical tree.
- the construction of index over the keys of the data records of trie constitute vertical oriented tries.
- the h upper levels constitute a representative index over the common keys of the blocks of the lowermost level tree.
- Storage medium Any medium that may be used to store data, including either or both of internal and external memory.
- External memory may be one or more of the following: magnetic tape, magnetic disk, optical disk, or any other physical medium used for storing data.
- Internal memory includes any known main memory including cache memory as well as any other physical storage medium that serve as internal memory.
- Short link - (referred to also as near link) a link labeled k between a node a having the value r to node b in the same block such that the keys of the data records that include node b on their access path have the value k at key position r.
- Long link - (referred to also as far link) a link between a node v in block B of level i to block B' of level i - 1 or to a data record. If v has value r and the label of the link is k, then the value of the common key of block B or the key of the data record is k at position r.
- the label of a short link or a far link is also referred as the value or direction of the link.
- split link If a block overflows and a split process is performed such that if node a is linked to node b, and after the split node b and its descendent nodes are accommodated in a different block — block B — then the link between node a and node b is a split link. After the split, the split link is the link between node a and block B (that is accommodating node b). A split link is a labeled link.
- PAIF maintaining the split link from node a to to the block B where node b resides is optional since one can access block B through the layered index.
- Direct link - a link between node v in block B of level i to block B' of level i -l , that includes a node v' such that nodes v and v' have the same value. If a search path to data record with a key k includes node v but does not include any of its near and far links then it should contain the direct link to block B'. A direct link has no label.
- v is considered a duplicated node of v'.
- a duplicated node maintains a direct link to the block that includes node v'. (a duplicated node is also referred as copied node).
- Data records consist as a rule of several fields, some of which are designated as keys. Sometimes the records are ordered by one of the keys, called the primary key.
- An index (or index scheme) over the keys of data records or over representative keys (for the definition of the latter see below) is a data structure that facilitates search by one or more of the keys. Examples of index are any of the specified Multi-way tree index schemes.
- An index according to the invention may be constituted by using more than one index scheme.
- the index may be stored in a file or files that reside partially or entirely in the internal memory or external memory.
- an index that includes a partitioned index — a dynamic data structure - that allows search by key, and is partitioned into blocks, each of which contains a representative key.
- the representative keys should be sufficient to find the block associated with a record whose key equals the search key (if one exists). Having located the block, the data record may easily be retrieved.
- the representative keys are not necessarily stored physically in the block.
- partitioned index examples are:
- the sequence of blocks of a file ordered by increasing key value of the primary key.
- the index leads the search to the block containing the key.
- a partitioned index is constructed such that for each record the partitioned index contains its key and its link. These pairs are ordered by non-decreasing value of the key.
- the index leads to the block containing the address of the desired record.
- a partitioned indexes over the keys of data records is called a basic partitioned index and is denoted index layer I 0 .
- This partitioned index might become non-balanced, thus giving rise to some long search paths.
- an additional index layer (an index layer is denoted in short also index)/, is constructed over the representative keys of I 0 . If 7, is also a partitioned index then an additional index I 2 may be constructed over the representative keys of the blocks of 7, . This process may be repeated until creating an index I h (hereinafter root index) which preferably is fully contained within a single block.
- the root index I h is not necessarily a partitioned index.
- the layered index is not necessarily a partitioned index.
- I ,...,I h constitute a so called representative index.
- B (in I 0 ) overflows, it is split into two (or more) blocks and the representative of B in 7, is replaced by the representatives of the new blocks.
- the overflow of block B in 7, entails a splitting of B x and the representative of B in 7 2 is replaced by the representatives of the new blocks etc.
- an additional layer 7 ⁇ +] is created and added to the layered index.
- an "overflow" state may be determined according to the particular application, and does not necessarily triggered when block is rendered full. Thus, for example, by one embodiment overflow occurs when a block is at least half size full.
- Deletion is similar to insertion, and might involve merging — reverse process of splitting.
- the update or the split need not necessarily be performed on the fly, but may be delayed (i.e. performed postfactum).
- the construction of the layered index preferably retains a balanced index.
- the balanced index is sufficient, and in some cases where the layered index (without 7 0 ) is of relatively small volume (e.g. may be accommodated mostly or entirely in the internal memory) the "balanced structure" requirement may be exempted.
- the layered index as compared to the basic partitioned index (e.g. trie), it readily arises that accessing selected data records through the layered index is substantially more efficient than the accessing the same data records through said trie.
- the basic partitioned index e.g. trie
- “more efficient” means that the number of accesses to the storage medium through the layered index in order to perform an update transaction (e.g. insert, delete or modify) on a data record or access data record is smaller compared to the number of accesses to the storage medium through the basic partitioned index. Number of accesses should be construed such that in each access a block is handled (e.g. loaded or processed) from the storage medium.
- each key is regarded as a character or bit string.
- the trie cannot be accommodated in a single block, it is partitioned into blocks, such that each block contains a single subtree of the trie.
- the representative key of the block is the string associated with the root node of the trie in the block, i.e., the sequence of labels of the path from the root of the trie of I i to the root of the trie of the block.
- the representative keys of 7,. are the keys of 7. +1 .
- To search a key k in I M one searches for the longest prefix k in the blocks of I M and from there moves to the appropriate block of I i .
- the insertion of a record entails adding its key to 7 0 , i.e., adding a value to the trie of 7 0 . If as a result a block overflows, the block is split — it is partitioned into typically two (in some implementations more) blocks, such that each block contains a (connected) trie. To accomplish this a link between a node u and its child v is severed, and the subtree rooted atv is moved to another block. The representative key of the new block, is added to 7, . As in the general layered index scheme, this process is continued to
- the basic partitioned index is a compressed trie like Patricia or PAIF, only part of the keys are saved, this saves index space. However, these savings affect the manner in which the search is performed. In such compressed tries usually only nodes of degree greater than or equal to two are maintained. If the search key k does not belong to compressed trie, the search might terminate at some record r , and we have to check whether k is equal to the key of r . If the keys are different then the trie does not contain a record with key k .
- the split process also has to accommodate direct links.
- the access path to block £,._, of I._ x consists of block 5 ( . of layer 7,. , B t _ overflows and is split into blocks 5,._, and £._,' .
- Block B t has now to contain links to all its descendent blocks in /,._, . This can be accomplished by the following non-limiting technique:
- k._ x be the representative key of B ( _ x this key is inserted to 7j — the compressed trie of B i — so that the search to the keys of descendents of
- B,_ x reaches £,_,', and the search for the descendents of B t _ x reaches Z? ( _, .
- a non-limiting method to accomplishing split process is as follows:
- At least one short link among the short links of a node (hereon split node) in the block is deleted (hereon split link) in a way that at least two tries exist in the block.
- each of the sub-trees is moved to a separate block.
- the far link can be replaced by a direct link from the child node to block
- a split of a block in I k , k>0 is performed such that the split links (of I k ) are links between copied nodes of split nodes that reside in different blocks.
- the invention provides for in a storage medium used by a database file management system executed on data processing system, a data structure that includes: a layered index arranged in blocks; the layered index includes a basic partitioned index that is associated with data records; the basic partitioned index enables accessing or updating the data records by key or keys, and being susceptible to an unbalanced structure of blocks; said layered index enables accessing or updating the data records by key or keys and constitutes a balanced structure of blocks.
- the invention further provides for, in a storage medium used by a database file management system executed on data processing system, a data structure that includes: an index arranged in blocks and being constructed over the keys of data records; the index includes a basic partitioned index that is associated with the data records; the basic partitioned index enables accessing or updating the data records by key or keys, and being susceptible to an unbalanced structure of blocks; said index enables accessing or updating the data records by key or keys and constitutes a balanced structure of blocks.
- the invention provides for, in a storage medium used by a database file management system executed on data processing system, a data structure that includes: an index arranged in blocks and being constructed over the keys of data records; the index includes a trie that is associated with the data records; the trie enables accessing or updating the data records by key or keys, and being susceptible to an unbalanced structure of blocks; said index enables accessing or updating the data records by key or keys and constitutes a balanced structure of blocks.
- the invention provides for in a database file management system for accessing data records and being executed on data processing system; the data records are associated with a basic partitioned index arranged in blocks and being stored in a storage medium; the basic partitioned index enables accessing or updating the data records by key or keys and being susceptible to an unbalanced structure of blocks; a method for constructing a layered index arranged in blocks, comprising the steps of:
- the invention further provides for in a database file management system for accessing data records and being executed on data processing system; the data records are associated with a basic partitioned index arranged in blocks and being stored in a storage medium; the basic partitioned index enables accessing or updating the data records by key or keys and being susceptible to an unbalanced structure of blocks; a method for constructing an index over the keys of the data records, the index being arranged in blocks, comprising the steps of:
- a database file management system for accessing data records and being executed on data processing system; the data records are associated with a trie arranged in blocks and being stored in a storage medium; the trie enables accessing or updating the data records by key or keys and being susceptible to an unbalanced structure of blocks; a method for constructing an index over the keys of the data records, the index being arranged in blocks, comprising the steps of:
- the index is preferably, although not necessarily constructed by one or more of the indexing schemes selected from the specified index schemes.
- Typical, yet not exclusive, examples of multi-way trees indexes being the B-tree indexing scheme.
- said basic partitioned search scheme being a trie that is constituted by a digital tree of the kind disclosed in U.S patent no. 5,495,609.
- said trie is constituted by a so called Probabilistic Access Indexing File (PAIF).
- PAIF Probabilistic Access Indexing File
- a data structure that includes at least one probablistic access indexing file (PAIF) having a plurality of nodes and links; the leave nodes of said PAIF are associated each with at least one data record accessible to said user application program and wherein at least portion of said data record constitutes at least one search-key; selected nodes in said PIAF represent, each, a given offset of a search key portion within said inset search key; link(s) originated from each given node from among said selected nodes, represent, each, a unique value of said search key portion; the PIAF having at least two sub-PIAF's being arranged, each, in a block; said data base file management system is further capable of arranging said blocks as a balanced structure of blocks.
- PAIF probablistic access indexing file
- said selected nodes whilst preferably including only a given offset, this is not always necessarily the case.
- one or more of said nodes may include other information, such as portions of the keys and/or other information, all as required and appropriate.
- the indexing scheme is constituted by a search scheme substantially identical to that of the PAIF trie.
- a database file management system that employs a layered index of the invention is advantageous, in terms of enhanced performance as compared to hitherto known techniques inter alia owing to the following characteristics:
- the data are held inherently in sorted form according to search key. Namely, One can navigate in the tree by the order of the keys of the data records.
- the layered index inherently supports sequential operations like "get next" and “get previous”. In this respect, the proposed layered index constitutes an advantage over e.g. hashing scheme and some implementations of digital trees.
- a balanced layered index is retained and the depth of the layered index is relatively small, thereby minimizing the number of accesses (normally slow I/O operations) that are required to perform update transaction or access data record. According to one embodiment, practically one I/O
- the invention thus further provides for in a computer system having a storage medium of at least an internal memory that ranges between 10 to 20
- M byte or more and an external memory; a data structure that includes an index over the keys of the data records; the index is arranged in blocks; such that for one billion data records substantially no more than two accesses to said external memory are required in order to access a block that is associated with any one of said billion data records, irrespective of the size of the key of said data records.
- the invention provides for in a computer system having a storage medium of at least an internal memory that ranges between 10 to 20 M byte or more, and an external memory; a data structure that includes an index over the keys of the data records; the index is arranged in blocks; such that one million data records substantially all the blocks of the index are accommodated in said internal memory regardless of the size of the key of said data records.
- the invention further provides for In a computer system having a storage medium, a data structure that includes an index over the keys of data records; the index is arranged in a balanced structure of blocks and enables to perform sequential operations on said data records; the index size is essentially not affected from the size of said keys.
- the data records may reside in the blocks of the layered index, or may reside in separate data files (one or more). In the latter embodiment the data records should be associated, of course, to the corre- sponding layered index. As will further be clarified with reference to the description of specific embodiment below, a given data record may accommodate more than one search key.
- the index is preferably, although not necessarily, constructed by one or more of the indexing schemes selected from the specified index schemes.
- Typical, yet not exclusive, examples of multi-way trees indexes being the B-tree indexing scheme.
- normally data consists of records of several types (e.g. in the example above books and borrowers).
- the type of the record determines its fields (attributes) and its keys.
- the type of each key is not kept with the record and not considered part of the key.
- the program "knows" the type of the record, and therefrom the fields of the data records and their structure.
- Each type of key is assigned with a designator — a string of bits, e.g. a series of one or more characters which, normally but not necessarily, (is) are added as a prefix to all keys of this type.
- a designated key is a key with its designator.
- the designator is treated as part of the key (for search or update purposes), and therefore is part of the index scheme.
- the designator enables to obtain the properties of the data record as a function of the type. Thus by looking at the designator of the key, one obtains the designator hence can deduce the type of the record, one need not know the record type a priori.
- Data records in which the keys are designated are called designated data records.
- a designated index is an index that enables search on designated data records.
- K2 is subordinated to Kl
- the designator of K2' is D2
- the designator of R2 is also D2 (or DI, D2).
- R2 is subordinated to Rl
- the key of R2 is composed by concatenating K2' to Kl . Note that in K2 1 , D2 is prefixed to K2.
- the type of record Rl and the type of record R2 may stand in a one-to-many relationship, meaning that several records of type R2 may be related to a single record of type Rl.
- Such a relation can be implemented by the subordination relation: several records of type R2 will be subordinated to a single record of type (e.g., several books can be borrowed by the same borrower).
- this relationship is one-to-one (e.g. one to one is the relationship where only one book can be borrowed by each borrower) then the key K1'D2, where D2 is the designator of R2, is sufficient to locate R2.
- the search path to K1'K2' includes the search path to Kl'.
- the subordination relation is not limited to just two levels, the subordinated record can itself have a record subordinated to it and accordingly n level of subordination may be accomplished.
- the subordinated record can itself have a record subordinated to it and accordingly n level of subordination may be accomplished. For example, consider a banking database, where the account records are subordinated to the branch records, and deposits records are subordinated to accounts.
- R be a record that is identified by either of two keys Kl and K2. Then, the designatored index should contain two search paths to R, one by the designated key Kl' and one by the designated key K2'. Accordingly, R constitutes a multi-dimensional record.
- a multi-dimensional index includes the designated index and the multi-dimensional data record(s).
- the above discussion and example considered a multi-dimensional index where the data records do not necessarily exhibit subordination relationship.
- the multidimensional index may optionally applied also to subordinated data records.
- a single designated index provides access to accounts (by the designated key £/ account-number), to depositors (by the designatored key k 2 depositor-name) and to deposits by both k x k 2 and k 2 k x . (It is possible, of course, to use different designators for the k x when it is subordinated to k 2 and to k 2 when it is subordinated to k x .)
- the designator of a multi-dimensional record depends on the designator of the key used to search or update the record.
- the designator of a car record (FIAT, 127) is A when searching or updating the record by the key AFIAT, and is B when accessing it via the license plate number B 127.
- the meta-data includes information on the different records as a function of their type. Thus, it is needed to identify the designator and as a result the information on the record is available, for example a description of the various fields, keys, subordination, record size etc.
- the search scheme in the designated index is oblivious to the meta-data. It locates the record, identifies the designator (for example the designator can be prefixed to the record) and construct the (composite) designated key.
- a data structure that includes: an index over the keys of data records; the data records being of at least two types where data records of the second type are subordinated to the data records of the first type.
- a data structure that includes: a designated index over designated keys of data records; the data records, constituting designated data records, being of at least two types where designated data records of the second type are subordinated to the designated data records of the first type.
- the data structure that includes designated index and designated data can maintain the relations between different data items, ⁇
- the data structure that includes designated index and designated data can link logically related items.
- the data structure that includes designated index and designated data can support several data models simultaneously and efficiently.
- the data structure that includes designated index and designated data allows high efficiency in maintaining data integrity.
- the data structure that includes designated index and designated data allows high efficiency in retrieving relating data.
- the data records may constitute part of the PAIF, or may reside in one or more separate data files. In the latter embodiment the data records should be linked, of course, to the corresponding PAIF. As will further be clarified with reference to the description of specific embodiment below, a given data record may accommodate more than one search key.
- an index structure can be of a minimal size, not depending on the size of the keys.
- the invention provides in a storage medium used by a database file management system executed on data processing system, a data structure that includes: an index being stored in the storage medium and constructed over the keys of said data records that are stored in blocks; the index being arranged in blocks with the leaf blocks being linked to data records by means of links; said index is characterized in that at least one of said links is shared by at least two data records stored in the same block.
- the index being constituted by a trie.
- the invention provides for, in a storage medium used by a database file management system executed on data processing system, a data structure that includes: an index being stored in a storage medium and constructed over the keys of said data records that are stored in blocks; the index being arranged in blocks with the leaf blocks being linked to data records by means of links; said index is characterized in that at least one of said links is shared by at least two data records stored in the same block; said index constituting a layered index according to claim 1, and blocks of said basic partitioned index are linked to said data records.
- the layered index, basic partitioned index and data records are used for directory applications.
- Fig. 1 shows a generalized block diagram of a system employing a database file management system
- Fig. 2 shows a sample database structure represented as an Entity Relationship Diagram (ERD), and serving for illustrative purposes;
- ERP Entity Relationship Diagram
- Fig. 3 shows the database of Fig. 2, represented as tables in accordance with the relational data model, with each table holding few data occurrences;
- Fig. 4 shows the "CLIENT" table of Fig. 3, in accordance with file management system employing conventional B + tree index scheme;
- Fig. 5 shows the "CLIENT” table of Fig. 3, in accordance with file management system employing conventional trie index scheme
- Figs. 6A-6C show the "CLIENT” table of Fig. 3, in accordance with file management system employing a PAIF index scheme
- Figs. 7A-7H show schematic illustrations exemplifying construction of a layered index, according to one embodiment of the invention.
- FIGs. 8A-B show schematic illustrations exemplifying construction of a layered index, according to yet another embodiment of the invention.
- FIGS. 9A-G show schematic illustrations exemplifying construction of a layered index, according to yet another embodiment of the invention.
- Figs. 10A-B show schematic illustrations exemplifying construction of a layered index, according to another embodiment of the invention.
- Fig. 11 shows a schematic illustration exemplifying construction of a layered index, according to still yet another embodiment of the invention.
- Fig. 12 shows a schematic illustration for exemplifying use of designators in a designated index in accordance with one embodiment of the invention
- Fig. 13A-E show five schematic illustrations for exemplifying feature of subordination of data records in a designated index in accordance with one embodiment of the invention
- Fig. 14 shows a schematic illustration of a designated index exemplifying multi-dimension record according to an embodiment of the invention
- Fig. 15 shows a schematic illustration of a designated index according to another embodiment of the invention.
- Fig. 16 shows a schematic illustration for exemplifying feature of relations among data records provided in accordance with one embodiment of the invention
- Fig. 17A-B show a schematic illustration of compressed representation of links to data records in accordance with one embodiment of the invention
- Fig. 18A-D show four benchmark graphs demonstrating the enhanced performance, in terms of response time and file size, of a database utilizing a file management system of the invention vs. commercially available Ctree based database;
- Fig. 19A-D show four benchmark graphs demonstrating the enhanced performance, in terms of response time and file size, of a database utilizing a file management system of the invention vs. commercially available Btree based database.
- Fig. 20 illustrates schematically an exemplary directory structure.
- Fig. 21 illustrates schematically the hierarchical relations between items in the directory.
- Fig. 22 illustrates one embodiment of representing a directory structure using an unbalanced trie structure
- Fig. 23 illustrates the trie structure of Fig. 22, after having been subject to balancing, so as to constitute a balanced structure.
- Fig. 1 showing a generalized block diagram of a system employing a database file management system of the invention.
- a general purpose computer e.g. a personal computer (P.C.) employing a Pentium microprocessor 3 commercially available from Intel Corp. U.S. A, has an operating system module 5, e.g. Windows NT commercially available from Microsoft Inc. U.S.A., which communicates with processor 3 and controls the overall operation of computer 1.
- P.C. personal computer
- Windows NT commercially available from Microsoft Inc. U.S.A.
- P.C. 1 further accommodates a plurality of user application programs of which only three 7, 9 and 11, respectively are shown.
- the user application programs are executed by processor 3 under the control of operating system 5, in a known per se manner, and are responsive to user input fed through keyboard 13 by the intermediary of I/O port 15 and the operating system 5.
- the user application programs further communicate with monitor 16 for displaying data, by the intermediary of I/O port 17 and operating system 5.
- the user application programs can access data stored in a database by means of database management system module 20.
- the generalized database management system as depicted generally in fig.
- high level management system 22 which views, as a rule, the underlying data in a "logical" manner and is responsive, to the user application program by means known per se such as, e.g., SQL Data Definition and Data Manipulation language (DDL and DML).
- the database management system typically exploits, in a known per se manner, a data dictionary 24 that includes meta-data which maintains information on the underlying data.
- the underlying structure of the data is governed by database file management system 26 which is associated with the index scheme and actual data records 28.
- the "high-level” logical instructions e.g. SQL commands
- the "lower level” commands that access or update the data records that are stored in the database file(s) and to this end the database file management system considers the actual structure and organization of the data records.
- the "high level” and “low level” portions of the database file management system can communicate through a known per se Application Programmers Interface (API), e.g. the Microsoft open database connectivity (ODBC) interface commercially available from Microsoft.
- API Application Programmers Interface
- ODBC Microsoft open database connectivity
- Fig. 1 further shows, schematically, a storage medium in the form of internal memory module 29 (e.g. 16 Mega byte and possibly employing a cache memory sub-module) and an external memory module 29' (e.g. 1 gigabyte).
- internal memory module 29 e.g. 16 Mega byte and possibly employing a cache memory sub-module
- external memory module 29' e.g. 1 gigabyte
- external memory 29' is accessed through an external, relatively slow communication bus (not shown), whereas the internal memory is normally accessed by means of a faster internal bus (not shown).
- the database management system utilizes operating system services (i.e. an I/O operation) in order to load, through the external communication bus, one or more blocks of data from the external to the internal memory. If the sought data records are not found in the loaded blocks, additional I/O operations are required until the sought data records are targeted.
- operating system services i.e. an I/O operation
- Computer 1 may serve as a workstation forming part of a LAN Local Area Network (LAN) (not shown) which employs a server having also essentially the same structure of Fig. 1. To the extent that the workstations and the server employ client-server based protocols a predominant portion of said modules (including the database records themselves 28) reside in the server.
- LAN Local Area Network
- the database may be an on-line database residing in an Internet Web site.
- the invention is, of course, not limited to the specified partition of small internal memory and large external memory.
- a large internal and external memories are employed and by yet another modified embodiment only internal memory is employed.
- system 1 is illustrated in a simplified and generalized manner.
- database file management systems and in particular of the various components that are normally accommodated in database file management systems can be found, e.g. in Chapter 7 of "Database System Concepts" ibid.
- Fig. 2 showing a sample database structure represented as Entity Relationship Diagram (ERD), and serving for illustrative purposes.
- ERD 30 of Fig. 2 consists of the entities "CLIENT” 32 and “ACCOUNT” 34 as well as an "n to m" "DEPOSIT” 36 relationship indicating that a given client may have more than one account and by the same token a given account may be owned by more than one client.
- the entity “CLIENT” has the following attributes (fields): “Client_Id” 38 being a key attribute that uniquely identifies each client, "Name” 39 standing for the client's name and “Address” 40 standing for the client's address.
- the entity “ACCOUNT” has the following attributes (fields): “Acc_No” 42 being a key attribute that uniquely identifies each account, and "Balance” 43 holding the balance of the account.
- the relationship “DEPOSIT” consists of pairs of keys of the "CLIENT” and “ACCOUNT” entities, such that each pair is indicative of particular account owned by specific client.
- Fig. 3 there is shown a database of Fig. 2, represented as three tables 50, 51 and 52 corresponding to the relational data model, 32, 34 and 36, respectively, with each table holding a few data occurrences for illustrative purposes.
- the length of the key field (“Client D") of the "CLIENT” table is 5 digits
- the length of the key field (“Acc D") of the "ACCOUNT” table is 6 digits.
- the client table holds 5 data occurrences 55-59
- the account table holds 2 data occurrences 65, 66
- the deposit table holds 3 data occurrences 70-72.
- FIG. 4 illustrates an underlying indexing file of the "CLIENT" table of Fig. 3, in accordance with file management system employing the conventional B- tree indexing scheme.
- the indexing file 80 consists of three blocks 80a-c, standing for a root block and two leaf blocks respectively.
- the data records are organized randomly in a separate file 81 holding the five data records 83-87.
- Each block consists of a succession of pair of fields (e.g. 82a-b and 83a-b in block 80a).
- each pair stands for a search key value and the second field stands for a link such as number that identifies the next block to search, or in the case of a leaf block a link to the data record such as a number identifying the data record.
- the latter realization form a non limiting embodiment of associating a data record to a block.
- a search for records with a key that equals 12355 or smaller value are directed from root block 80a to block 80b.
- a search for a record whose key is 12355 (82a) starts in root block 80a and is directed by the link 82b to block 80b.
- the search key 12355 (86a) is associated with link 86b indicating the address of the data record identified by this search key in the data file 81.
- the data record that is identified by search key "12355" (57 in Fig. 3) is the forth in order in data file 81.
- the B ' tree indexing file of Fig. 4 exhibits one of the significant shortcomings of this approach in that the keys (i.e. search keys) are duplicated, i.e. they are held both in the internal blocks (i.e. in the index scheme) and in the data records associated with the B- tree index.
- the search key of data record 57 (in Fig. 3) is not only held as an integral part of the data record 86 in file 81 but also in block 80b (search key 86a) and sometimes in parent blocks such as 80a (search key 82).
- Fig. 5 illustrates a different indexing scheme of the "CLIENT" table of Fig. 3, in accordance with a file management system employing a known trie indexing scheme.
- trie indexing file 90 includes plurality of nodes and links wherein each node stands for an offset position and the link stands for a value at this offset.
- Table 91 has four columns. The first column indicates which digit position is to be used, the second column the value of that digit. A digit value partitions the key into two subsets. Columns three and four direct the search procedure to the next step.
- a digit at the position indicated by the root is compared to the value specified at the second column of the same line (value "5" indicated also by link 90b in the trie index). Since the digit at position 5 of the sought search key 12355 is indeed 5, control is transferred to line 2 (as indicated by the third column of line 1 of table 91).
- the digit at position 3 of the sought search key (90c in the tree, being also the value of the first column of the second line in table 91) is compared to the value 3 (link 90d, being also the second column in the second line of the table 91).
- the above frie is associated with some shortcomings: it retains an even distribution of the data at the cost of knowing a priori the contents of the database and consequently partitioning the keys so as to obtain balanced structure. Knowing a priori the contents of the database is obviously undesired as it poses undue constraint since databases of the kind described in Fig. 2 are of a dynamic nature, e.g. for the specific database of Fig. 2, new clients open accounts, senior clients close accounts, new clients are registered as co-owners of existing accounts etc.
- a new trie index scheme designated PAIF As will be shown below, the PAIF is not confined to a tree structure.
- various embodiments of layered index are described, with reference to FIG. 7-9, which include representative index constructed over the representative keys of the PAIF.
- the index scheme of the representative index and that of the basic partitioned index being substantially the same PAIF.
- Fig. 10 there is described yet another embodiment of the layered index, with a different trie.
- the representative index and the frie are also substantially the same. This, however, is not obligatory and as is exemplified, e.g. with reference to Fig. 11, where the trie and the representative index are different.
- FIGs. 6A-C there is shown a succession of schematic illustration of the "CLIENT” table of Fig. 3, in accordance with the file management system employing the PATF.
- the terms “transaction” and “operation” are used interchangeably.
- Fig. 6A there is shown the Client's data record 103 (56 in table Client of Fig. 3) having search key "12345" (i.e. a 5-byte-long search key).
- the PATF of Fig. 6A (100) is, of course, trivial and consists of a single node 101 (standing for both the root node and the leaf node) linked by means of a long link 102 to data record 103.
- the node 100 represents an offset 0 in said search key and the link 102 represents a value "1" of the search key portion (being by this particular embodiment 1 -byte- long) at the specified offset.
- the data record 103 is associated with a search path being a unit that consists of a node 101 and a link 102 which defines an offset and a pertinent search key portion value that conforms to the corresponding search key portion value at that particular offset within the search key of the specified data record. More specifically, the value of the one-byte search-key-portion at offset 0 within search key "12345" is indeed
- Fig. 6B-1 there is shown a PAIF 108 after the termination of a successive transaction in which the data record having Client_Id_No "12445" 107 has been inserted (data occurrence 58 in table Client of Fig. 3).
- the search keys of data records 103 and 107 are distinguished only in the third byte (offset 2), i.e. "3" and "4" respectively.
- Figs. 6B-2 and 6B-3 illustrate other two options of realizing the PAIF of Fig. 6B-1, where in Fig. 6B-2 the full key is represented in the PAIF (e.g.
- the preferred procedure for inserting a new data record into an existing PAIF includes the execution of the following steps: i. advancing along a reference path commencing from the root node and ending at a data record associated to a leaf node (referred to as "reference data record"); in each node in the reference path, advancing along a link originated from said node if the value represented by the link equals the value of the 1-bit-long key portion at the offset specified by said node; in the case that the offset specified in the node is beyond any corresponding key portion in the key, or if there is no link with said value, advancing along an arbitrary path to any reference data record ; ii.
- discerning offset comparing the search key of the reference data record to that of the new data record for determining the smallest offset of the search key portion that discerns the two (hereinafter discerning offset). iii. proceed to one of the following steps (iii.0-iii.3) depending upon the value of the discerning offset: iii.O if the data records are equal then terminate; or iii.1 if the discerning offset matches the offset indicated by one of the nodes in the reference path, add another link originating from said one node and assign to said link the value of the search key portion at the discerning offset taken from the search key of the new data record; or iii.2 if the discerning offset is larger than that indicated by the leaf node that is linked, by means of a link, to the reference data record: iii.2.1 disconnect the link from the reference data record (i.e.
- the new node is assigned with a value of the discerning offset; iii.2.2 connect the reference data record and the new node (which now becomes a leaf node) and assign to the link (long link) a value of the search-key-portion at the discerning offset taken from the search key of the reference data record; iii.2.3 connect by means of a link the new data record and the new node and assign to the link (long link) a value of the search-key-portion at the discerning offset taken from the search key of the new data record; or iii.3 if conditions iii.0,iii.l and iii.2 are not met, there exists, in the reference search path, a father node and a child node thereof such that the discerning offset is, at the same time, larger than the offset assigned to the father node and smaller than the offset assigned to the child node -(- considered case A), or all the nodes in the
- the CLIENT data record having Client_Id (or search key) "12546" (59 in table Client of Fig. 3) is inserted to the PAIF of Fig. 6B.
- a move is made along the reference path commencing from the root 101 and ending, for example, at data record 103 which stands for the "reference data record”.
- step (ii) results in that the search key of the new data record in distinguished from the search key of the reference data record (103) at offsets 2 ("5" vs. "3") and 4 ("6" vs. "5").
- the smallest offset (“discerning offset") is therefore 2.
- step (iii) the condition of step iii.l is met since the discerning offset is equal to that assigned to node 104. Accordingly, and as is shown in Fig. 6C-1, new link 111 connects node 104 to the new data record 112. The value assigned to link 111 is 5, being the byte value at position 2 in the search key of the new data record 112. PATF 110 of Fig. 6C-1 is therefore the result of inserting the data record 112 into the PAIF 108 of Fig. 6B-1.
- step (iii) the condition of step iii.2 is met since the discerning offset 3 is larger than the offset 2 of leaf node 104 in the reference search path. Accordingly, in compliance with step iii.2.1 and as is shown in the resulting PAIF 120 of Fig. 6C-2, the link 106 is disconnected from reference data record 103 and is connected to a new node 121. The new node is assigned with the discerning offset 3. Next, in compliance with step iii.2.2, the reference data record 103 and the new node 121 are connected by means of new link 122.
- the new link is assigned with the value 4 (being the digit value at the discerning offset 3 taken from the search key "12345" of the reference data record 103); and finally, as stipulated in step iii.2.3, the new data record 123 is connected to node 121 by means of link 124 which is assigned with the value "5" (being the digit at the discerning offset 3 taken from the search key "12355" of the new data record 123).
- PAIF 120 of Fig. 6C-2 is, therefore, the result of inserting the data record 123 into the PAIF 108 of Fig. 6B-1.
- the third and last example concerns inserting the CLIENT data record having Client_Id (or search key) "11346" (55 in table Client of Fig. 3) into the PAIF of Fig. 6B-1. Applying the aforementioned steps i and ii result in advancing from node 101 to data record 103 (in Fig. 6B) and establishing that the discerning offset is 1.
- step iii the condition of step iii.3 is met. Accordingly, in compliance with step iii.3.1 and as is shown in the resulting PATF 130 of Fig. 6C-3, the link 102 is shifted to a new internal node 131.
- the new internal node 131 is assigned with the value 1 (being the discerning offset).
- the new data record 132 and node 131 are directly connected by means of new link 133.
- the value assigned to link 133 is 1 (being the digit at the discerning offset 1 taken from the search key "11346" of the new data record 132), and finally, in compliance with step iii.3.3 the new internal node 131 is linked to node 104 by means of link 134 assigned with the value 2 (being the digit at the discerning offset (1) taken from the search key "12345" of the reference data record 103).
- current node For each link originated from the current node: compare the search-key-portion of the sought data record at the offset defined by the current node value to a value assigned to said link; in case of a match advance along said link and return to step i.l; i.2.
- step i.l the value of the digit "1" at the offset assigned to the root node (offset 0) of the sought data record is compared to the one assigned to link 102 (being the sole link originated from node 101). Since a match is found, control is shifted to node 131.
- step i.l the value of the digit ("2") at the offset assigned to node 131 (offset 1) of the sought data record is compared to the one assigned to link 134.
- control is shifted to node 104.
- step i.l the value of the digit "4" at the offset assigned to node 104 (offset 2) of the sought data record is compared for each link originating from mode 104.
- the comparison results in a match for link 105 and accordingly control is shifted to data record 107.
- step i.3 the search key of the sought data record and that of data record 107 are compared and since a match is found a "FOUND" result is returned (step i.3.1).
- step i.3 the comparison between the sought data record and data record 107 results in a mismatch, and according to step i.3.2 a "NOT FOUND" result is returned.
- the leaf node that is linked to the sought data record is referred to as the "target node".
- the father of the target node is referred to as the "predecessor target node”.
- the link that connects the predecessor target node to the target node is referred to as the "predecessor link” and the link that connects the target node to a child node thereof (or to a data record other than the sought data record) is referred to as the "target link”.
- the following steps are executed: i. delete the sought data record and the link that links the target node thereto; ii. if the number of links that remain in the target node is larger than or equal to 2, then the deletion procedure terminates; iii.
- the current step is more of "prudent memory management" step in order to release the space occupied by the target node and link, so as to enable allocation thereof to other nodes and links in the block. It should be further noted that said step (iii) is optional.
- the latter record is searched in the PAIF according to the procedure described above. Having found the data record 132 and in compliance with step i above, the data record as well as the link 133 leading thereto are both deleted. Since after the latter deleting step, the target node 131 remains only with the sole target link 134, step iii and iii.l apply, and accordingly the predecessor link 102 bypasses target node 131 and is directly linked to the child node thereof 104. Next, in compliance with step ii.2, target node 131 and the target link 134 are deleted thereby obtaining the PAIF shown in Fig. 6B-1. Another Example is given with reference to the PATF of Fig.
- the "modify” applies to a search key field (e.g. change an account no. from “xxxxxx” to "yyyyyyy”).
- This command is realized as a sequence of two other primitives, i.e. delete data record having "Account_No” - 'xxxxxx” and thereafter insert data record having "Account_No” - 'yyyyyy”, or vice versa.
- a Modify transaction may consist of both cases.
- each search key is represented as a series of bytes and accordingly the search procedure is performed by partitioning the search-key into search key portions each consisting of at least one byte.
- the / value is not identical for all the nodes in the PAIF.
- a node in the PAIF is not necessarily classified uniquely.
- node 104 is at the same time a leaf node (linked, by means of a long link 105 to data record 107) and an internal node (linked by means of a short link 106 to node 121).
- FIG. 7A-H there are shown schematic illustrations of a layered index constructed in response to a succession of split block operations, according to one embodiment of the invention.
- a block 140 in Fig. 7 A in the basic partitioned index
- a split block procedure is invoked which results in a layered index 142 of Fig. 7B consisting of root block 144 and a duplicated node A' (155) linked to leaf block 146 by means of direct link 145 and by means of long link 147 to a leaf block 148.
- the split point was selected to be link 149 (fig. 7 A) (hereinafter "split link”) thereby shifting nodes A,B,E D and F to new block 146 and nodes C,G,I,J,K,L and H to a new block 148.
- the split link is preferably selected in order to accomplish an essentially even distribution of nodes and links between the new blocks (e.g. the size of the sub PAIFs that resides in blocks 148 and 146 is essentially the same).
- a father block -144 (constituting 7, ) is created with a duplicated node A' (155) of the split node A (156).
- nodes A and C may also be linked by means of split link marked as dashed line 150.
- Fig. 7B there is provided a layered index constituted by blocks 144, and the blocks of the trie are 146 and 148.
- a layered index constituted by blocks 144, and the blocks of the trie are 146 and 148.
- block 148 overflows it undergoes similar block split procedure resulting in layered index 151 in Fig. 7C.
- the split link is short link 152 of Fig. 7B and accordingly nodes C and H reside in block 148A of Fig. 7C whereas nodes G,I,K,L and J reside in block 148B.
- the node from which the split link originates (node C -153 of Fig. 7B) is duplicated (yielding a duplicated node 153a of Fig.
- direct link 154 connects the copied node C 153a to the block 148A of the original split node 153 whilst the link 155 is a far link to the split block 148B and the value of the link is as the original value of link 152 between nodes C and G before (and after) the split.
- the, layered index 151 is constituted by the trie that includes blocks 141, 148A and 148B forming 7 ⁇ and block 16 which forms a representative index over the common keys of the trie.
- node A in block 141 and node C in block 148A are optionally disconnected and likewise node C of 148A and node G of 148B are optionally disconnected.
- nodes A ' and C are connected in block 140 to form a (connected) trie and it is accordingly possible to access blocks 141 through node A' and direct link 156; block 148A through node A', C and direct link 154; and block 148B through nodes A', C and direct link 155. It is noteworthy that the value of the link between nodes A' and C (in block 140) is identical to the original value between nodes A and C (see link 149 in Fig. 7 A).
- the resulting layered index constitutes a balanced structure of blocks thereby keeping the index depth to a minimum and consequently minimizing the number of accesses (normally, although not necessarily, I/O operations) that are required in order to find, insert or delete a given data record.
- the layered index maintains substantially logarithmic function that depends on the number of records, the layered index is more efficient in terms of number of I/O operations required for access a given data record as compared to the number of I/O operations required to access a data record through the trie.
- the representative index and the trie comply with substantially the same index scheme i.e. the PATF.
- substantially the same scheme it is meant that there are some differences as will explained with reference to Fig. 9G below.
- Figs. 7D to 7H The considerations in connection with duplicating nodes to higher layers 7. in the layered index are further illustrated with reference to additional examples depicted in Figs. 7D to 7H.
- Figs. 7D where block split is performed in link 400.
- the resulting layered index is illustrated in Fig. 7E, where block 402 is created node 401 is copies to higher level block 402 (forming part of the layered index scheme) and the original link between nodes B and E is optionally retained (through dashed link 403).
- node B it is now possible to access the two blocks of the trie (405 and 406), by means of links 407 and 408, respectively.
- nodes A and I of block 405 are duplicated to A' and I' (410 and 411) in block 402 .
- Node F is obviously a duplicated node of the split node I in block 405.
- node A is also copied considering that both nodes B (whose counterpart B' is a priori residing in block 402) and I (whose I' is now duplicated to block 402) are descendent nodes of A. Node A being the lowest ancestor node of nodes B and I, and thus a (connected) trie is formed in block 402.
- the value associated with short link 414 (between blocks A' and B' in block 402) is of the same value as link 412 (between A and B in block 405).
- the value of the link 415 (between nodes A' and F) in block 402 is of the same value as that of link 413 which originates from node A in the direction needed to access node B.
- the internal structure of block 402 is such that it allows a search to the representatives of blocks 405, 406 and 407.
- the direct links 416, 417 of nodes 422 and 411 are optionally retained since it is possible to move along direct link 418 to block 405, seeing that node 410 is maintained in the access path to both nodes 422 and 411.
- Fig. 7G shows the resulting layered index after splitting block 407 of Fig. 7F (in link 420) and Fig. 7H shows the resulting layered index after splitting block 402 (in the link between nodes F and N').
- the resulting layered index in Fig. 7H has, as shown three layers, the first consisting of block 430, the second consisting of blocks 402 and 408 and the trie consisting of blocks 405, 407, 426 and 406.
- Delete block is activated when a data record is deleted leaving only one node in a block having no data records associated therewith.
- FIG. 8A illustrates a given trie structure having vertical orientation (i.e. constituting a vertical tree) which, as shown, is unbalanced i.e. three blocks depth (260, 261 and 262) vs. two blocks depth (260 and 264).
- the description below does not aim at explaining the search scheme of the specified vertical tree but emphasizes only those aspects which are required to obtain balanced layered index.
- the nodes in trie structure 260 signify offsets in a half byte size. (The nodes values are presented in hexadecimal representation) of the data records (a-k) that are shown in Fig. 8A.
- an extra I/O operation i.e. accessing three blocks - (or three I/O operations) in order to access data record k as compared to one block (or one I/O operation) to access data record b as depicted in Fig. 8A
- this does not necessarily require applying the technique of the invention in order to bring about exactly the same number of I/O operations.
- further insertions of data records may generate higher "unbalance" degree, which, if not handled by the technique of the invention, will give rise to degraded performance (due to the unbalanced structure) as discussed in detail above (with reference to prior art techniques).
- Fig. 8B illustrates one possible embodiment of the invention.
- a representative index that consists of one block 270 (forming I;) is constructed with the result that horizontal balanced tree is obtained having a root block 270 from which all the blocks of the lower level vertical tree (the latter constitutes the unbalanced trie) are accessed through one I/O operation.
- the common key of block 260 (in hexadecimal representation of half byte units) is Ox4, Oxl and 0x3, where 0x4 stands for the most signficant bits of the byte of the character A and Oxl stands for the least significant bits of the Character A, and Ox 3 stands for the most significant bits of the characters which reside in offset 2 of the data records.
- block 261 can accommodate a root node with value 8, thus, the common key, hereafter k of the block, is changed to be 0x4, Oxl, Ox3, 0x3, 0x3, Ox3, 0x3, 0x3, i.e. it consists of 8 units.
- the representative of block 261 in Ii should be changed accordingly.
- the representative of 261 is k, even if the root node with the value 8 does not exist.
- the index over the common keys is accomplished in the representative index (consisting of block 270) such that it constructs a trie that addresses the common keys of the first vertical tree.
- the representative index consisting of block 270
- the representative key of a block being a common key.
- the common key of a block is the longest prefix of all keys of the data records that can be accessed from the block by the relevant index scheme.
- the specified prefix size (calculated in 1-bit-long units) equals the value of the root node in the block (which as recalled holds offset value). If the prefix size is expressed as number of bits, then the prefix size is calculated as the offset value multiplied by the 1-bit-long value.
- Figs. 9A-9G showing a succession of modify (insert) transaction on a PAIF tree (constituting a trie that is susceptible to an unbalanced structure) and the so obtained layered index.
- the data records are shown as forming part of the trie.
- the actual manner in which the data records are associated to the trie may vary depending upon the particular application.
- a layered index is constructed by inserting successively the following unsorted data records A-F (which for convenience of presentation form part of the blocks):
- Block 300 includes node 301 having offset 0, being associated to first record A through link 302, having the value 0.
- the tree consists of Block 100 having only one node.
- the index scheme dictates that the search path to data record A is determined according to value 0 at offset 0 as depicted on link 302 and node 301, respectively.
- Fig. 9D data record D is inserted, and the structure of the block following the insert operation is shown in Fig. 9D. Since, however, the data block cannot accommodate more than two nodes (overflow occurs), it is now required to split Block 300.
- Fig. 9E illustrates the free structure after splitting.
- link 306 is the split link with the motivation that approximately the contents of a half block will be retained in Block 300, and the contents of the remaining half block will be moved to another block 310.
- other links could be likewise selected to be the split link.
- block 300 in 7 0 is replaced with two blocks 300 and
- the block of Bi does not exist, it is created, and, accordingly, block 312 is provided.
- the split node (313) is copied to the block (312) to thereby constitute a duplicated node (314).
- the duplicated node (314) is connected by means of direct link 316 to block 300, and the duplicated node 314 is linked by means of a far link 318, to the block 310.
- This far link replaces the original split link 306 that is marked in Fig. 9E in a dashed line.
- the value of the far link 318 is the same as the value of the split link.
- the representative index (constituted by block 312), allows to search according to the common keys of the basic partitioned index.
- data record E is inserted.
- advancing in the horizontal tree being one form of the layered index
- the far link 318 since it represents direction 1 from node 314 (having a 1) value, and a link in direction 0 is required. Therefore advancing by means of the direct link 316 to block 300.
- the block that needs to be associated with the new data record is found.
- data record F is inserted resulting in a tree structure shown in Fig. 9F.
- node 320 is copied to block 312 (designated 323 in Fig. 9G) and since it can not be linked to node 314 of block 312 (since it will not retain the correct inta-block links of the nodes) - node 311 of block 300 is also copied to block 312 (designated 322 in Fig 9G) in order to create a (connected) trie that enables to search by the search scheme to blocks 300, 326, 310 according to the common keys of the blocks.
- Figs. 9A-G and 8A-B illustrate two of many possible manners of realizing the split block mechanism that maintains the balance structure of the invention by constructing a layered index.
- the flexibility in adopting another non-limiting variant is shown e.g. in fig. 8B where the near link 271 and direct link 272 are represented by far link 273 (marked in dashed line) with direction as of link 271 rendering thus node 276 redundant.
- the balance technique of the invention confers to the so obtained balanced horizontal oriented digital tree (being one form of the layered index structure) a so called “probabilistic access " characteristics.
- a search in connection with an input data record e.g. search for a data record A
- Fig. 9E For a better understanding of the foregoing consider, for example, Fig. 9E.
- the search path will follow node 314 and link 318 (offset 1 value 1, respectively) and then at offset '6' (root node of block 310) through link 319 (value ' 1') to data record C.
- offset '6' root node of block 310
- link 319 value ' 1'
- the size of the common prefix of the key of the sought data record and the key of the data record is calculated.
- the common key of the block (310) is the prefix portion of the key of the actual data record C.
- the size of the common prefix is zero.
- climb up the tree to the node in the access path that has a value equal to or less than the common prefix size that has a direct link . If the latter requirement is not met, i.e. all the nodes have a value greater than the calculated prefix size, then from the first node in the access path that has a direct link (which should point to the first block of the index /,.;).
- the search path follows the direct link from a node with the largest value on the search path (that maintains a direct link).
- a comparison to the common key (if available) or to data records associated with nodes (if available) can lead to a decision as to whether or not to advance by the index scheme or to return to a node with a direct link.
- the common key is not necessarily physically attached to the data records.
- the value of the split node is 1 (of node 313), thus block 310 is not the block that accommodates record L (if such record exists). Therefore, the search for record L is continued from node 314 and link 316. This procedure applies to all modify transactions.
- block 300 is found in the manner specified above and is associated with the new data record L.
- the probabilistic search characteristics which leads to "errors" stems from the fact that not necessarily the complete common key of a block in layer I h _ x is known from the values of the node that reside on the search path up to the block in 7 A _, . Thus, it is necessary to know the common key of the block in 7 A _, in order to verify if the search path to the specified block matches the search path according to the key of the sought data record. If the common key is not maintained in the block, it might be needed to advance in the index to a data record in order to know the common key value.
- Fig. 10B where the representative index is constituted by block 159A over the representative keys of the trie (constituted by blocks 159b and 159c).
- the link between node 12 and 14 is considered a split link, and the new node, 159D (being replication of node 12) is copied into a new block designated as 159A.
- the same number of I/O operations is required, and in this particular case, 2.
- the size of the trie grows the more efficient is the access using the layered index.
- the layered index of Fig. 10B brings about, thus, a balanced tree of blocks, assuring that essentially the same number of I/O operations is required to reach each and every data record in the tree.
- the number of I/O operations is a logarithmic function depending upon the number of data records and the number of links originated from a block.
- a layered index with 3 levels allows access to 1,000,000,000 data records.
- a layered index that consists of one block (e.g. block 144 in Fig. 7B) as index layer 7, and assuming that it is linked to a thousand blocks in the layer 7 0 (of which only two blocks 146 and 148 are shown in
- the layered index amounts for a total of 1001 blocks each having a size of 20,000 bytes. Accordingly, the total space that should be allocated for holding the blocks of the layered index is about 20 mega bytes. This order of size can be easily accommodated in the internal memory of say, for example, a personal computer. Assuming now that each block in 7 0 is associated with one thousand data records, the net effect is that by utilizing a layered index - f the invention (according to the latter embodiment) which is wholly accommodated in the internal memory, a million data records can be accessed without I/O index.
- the resulting layered index of fig. 10B includes two trees having vertical orientation i.e. the first tree structure consisting of blocks 159B and 159C (being one form of the basic partitioned index 7 0 ) and second tree having one block 159A (being one form of the basic partitioned index 7, ).
- root block 159A which, through one I/O enables to access all the links to the data records. Further insertions of data records which will lead to additional splits in the blocks of 7 0 , will require, of course, updating the layer index 7, .
- block 159A is split according to the split mechanism.
- the trie index with which the technique of the invention is of concern is not confined to the search tree disclosed in the '609 patent, and it may encompass other types of trees as explained above.
- intra-block structure is not necessarily balanced , i.e. nodes inside block are not necessarily arranged in a balanced structure. Whilst this fact is seemingly a drawback, those versed in the art will readily appreciate that its implications on the overall database performance are virtually insignificant.
- intra-block search scheme is normally performed in the fast internal memory of the computer system.
- the arrangement of a block within a layered index is retained in a balanced structure thereby the number of blocks in a search path is a logarithmic function depending on the number of data records and reflects therefore the number of I/O accesses to the external memory (an operation which is inherently slow) in order to load a desired block to the internal memory.
- the present invention is by no means bound to a given physical realization.
- search scheme is of concern whilst the intra-block retains the search scheme after applying the technique of the invention this applies to the logical concept of e.g. advancing in the layered index according to offsets and values of offset.
- the latter general concept may be realized in many manners all of which are encompasses by the technique of the invention.
- the offset size in terms of numbers of bits
- the manner of realizing empty pointers i.e. pointers that point to null - having no children
- the latter physical realization flexibility applies also to the inter-block portion.
- Fig. 11 illustrates another approach of balancing an unbalanced tree of Fig. 8A (i.e. constructing a layered index) using a conventional B tree as a representative index over the representative keys of the unbalanced trie.
- the so obtained horizontal oriented balanced tree (layered index) includes blocks 272 at the upper level (index layer 7 2 ), 270 and 271 at a lower level (index layer 7, ) and the original blocks of the unbalanced vertical oriented tree of Fig. 8A at the lowest (blocks 260,261,262,264) - index layer 7 0 .
- Fig. 4 demonstrates thus that the index scheme of the representative index is not necessarily the same as that of the original unbalanced trie. If desired, the B-tree in its entirety (forming a representative index) may be regarded as an index layer 7, .
- the database file management system of the invention not only copes with the drawbacks of the conventional trie indexing file but also offers other benefits which facilitate and improve data access by user application programs.
- the invention is by no means bound to the specified storage medium.
- the storage medium with which the present invention is applicable may also be an internal memory. This is of particular relevance considering the ever increasing volumes of internal memories which although being faster than external memory, may also required efficient access control which is realized according to the invention.
- the database file management system of the invention enables to address different types of data records using a single index.
- each data record belonging to a given type is associated with a given designator.
- the latter forms part of the key of the data record constituting a designator key.
- the designator is unique for every type of data.
- the key of data records that belong to the entity "Borrower” is prefixed with the designator 'A', whereas all the keys of data records that belong to the entity "Book” are prefixed with the designator 'B'.
- the new key of the data records that belong to Borrower becomes a designated key that consists now of the concatenation of 'A' and the original key of Borrower, and by the same token, the new designated key of the data records that belong to Book consists now of the concatenation of 'B' and the original key of Book.
- a data dictionary maintains meta-data information, which provides information on the data records as a function of the type of the records.
- meta-data information provides information on the data records as a function of the type of the records.
- the search scheme of the index is oblivious to the meta-data. It locates the record from the designator (or composite) key without using the meta-data.
- the meta-data is required to construct the (composite) designator key and, once the record is retrieved, to determine the properties of the record.
- the designator -B- is identified, and information on the record designated B is available from the meta-data. For example the size of the book record, its fields and the fields that are the key fields.
- designated data records is not bound to only one type, but rather (preferably) more than one type may be freated by the designated index and as will be explained below with subordination relationship.
- data records of different types may be addressed from the same index.
- the keys of data records that belong to different types do not necessarily have the same length.
- a layered index which is also a designated index based on a trie as its basic partitioned layered index of the kind depicted in Fig. 8A.
- the size of the key of the records that belong to the "Borrower” entity is 6 bytes long, whereas the size of the key of the records that belong to the "Book” entity is 5 bytes long.
- the terms record of type X or record designated X are used to describe a record having a designated key and the designator is X.
- Fig. 13A illustrates a designated index 800 (in the form of PAIF) with four data records 802, 804, 806 and 808 (of which only the designator keys are shown) associated thereto.
- the data records are all of the same type as readily arises from the designator 'A' that is prepended to each of the data records.
- Fig. 13B there is shown the PAIF 800 with new data record (812) with a composite key A12355B940201333333 (the designator of record 81 is B).
- the new data record is subordinated to data record 806 whose key is A12355.
- node 814 indicated that the discerning offset is 6 and that the value B links to data record 812 (having the value B at offset 6).
- record 806 has no value at offset 6, it is assigned with virtual value (say null) at this offset in order to determine the discerning offset vis-a-vis the other record and accordingly , then link 818 is set with direction marked null.
- Fig. 13C illustrates the PAIF 800 in which another data record 820 is inserted.
- Data record 820 which represents another instance of B type data record that is subordinated to A type data record (806) is inserted to the PAIF.
- the discerning offset is 11 (the value of the new node 822) and the link values thereof are '0' and ' 1' to data records 812 and 820, respectively.
- Fig. 13D illustrates the PAIF 800, where a different types of records are subordinated to record 806.
- Data record of type 'D' (824) being subordinated to data record of type 'A' is linked from node 814 by link 823 having the value D.
- the PAIF already represents data record designated B where the latter is subordinated to the data record designated A.
- An example of the 'B' type subordinated to 'A' type is items ('B') stored by supplier ('A') and ('D') type subordinated to ('A') is clients ('D) served by the supplier ('A').
- Fig. 13E there is shown another embodiment of the PAIF of Fig. 13D implemented slightly differently.
- the subordinated data records 812, 820 and 824 are represented and maintained in the data file without their key prefix that is the designator key of the record 806 (i.e. the prefixed key A12355 is omitted).
- the information available from the meta-data according to the designator B allows to extract the following information: (i) identify that part of the key is missing,
- Fig. 13D, 13E illustrate that the subornation relationship characteristics of the invention is not limited to any specific realization.
- the subordination relationship of the invention enables, thus, to render more efficient the low level implementation of data as compared to hitherto known techniques in the sense that one index can be associated with various data types and subordination relationships as compared to separate index files according to the prior art. This notwithstanding, there may of course be applications according to the invention, where more the one index file is utilized.
- each of the subordinated records 812, 820, 824 can have records subordinated to it.
- the data structure of fig 20E exemplifies other advantages resulting from the fact that subordinated data records are linked to their "parent" record. For example, if record from type A is a customer and record from type B is an invoice, it is usually needed to access the invoice details with the customer details. The link from the invoice to the customer obviates a separate search for the customer details.
- the so obtained designated index of the invention brings about another important advantage in that navigation in the index for accomplishing sequential operations.
- the move from node 814 to node 812 can be by the split link. If the split link does not exist, for example in fig. 7F one needs to use the link 421 of node B' (422) when it is needed to advance by link 400 from node B (423) to node E (424).
- Fig. 14 there is shown a schematic illustration of a designated index according to one embodiment of the invention.
- the index contains two search paths to one designated data record ("DEPOSIT" data record) such that the deposit can be accessed by each of the two composite keys - a designated key that includes the key fields account number, date and client number and a second designated key that includes the key fields client number, date and account number.
- the account data record has a designated key 'Al 33333' (1201)
- Updating a deposit for the account can be implemented by means of designated record 203 subordinated to designated record 201.
- the PAIF would allow to access records 201,203 from node 207 by link 206.
- data record 204 represents a deposit of a client.
- the key of record 202 is B133333. Updating a deposit 204 to a client 202 can be implemented by the index 200 and node 209 linked (208) to data record 204.
- the key of data record 203 is. 'A133333C01019811346' (Jfc, ).
- the key ofrecord 204 is B11346D010198133333 (yfc 2 )
- This drawback may be overcome by representing a single DEPOSIT record as a multidimension record 210.
- Data record 210 is a multi-dimension record that is updated and accessed by the designated index 200 according to the designator key k x (designator C) and according to the designator key k 2 (designator D). (note that when data record is a multi-dimension record, the designator of the record depends on the key that is being used)
- the path in the index by k x leads to node 207 and from that node to the designator C of record 210.
- the information in the meta-data according to the designator C allows to construct the relevant structure. For example construct a data structure that includes the key k x .b ⁇ links 213, 214 records 201 and 202 are accessed an thus with the date field of record 210 all the key fields are constructed.
- the path in the index by k 2 leads to node 209 and from that node to the designator D of record 210.
- the information in the meta-data according to the designator D allows to construct the relevant structure, for example construct a data structure that includes the key k 2 .
- the search path defined by the search keys of record 203 leads to the first field 212 having a value 'C (which is the designator according to search key k x ).
- the third field points to data record 201.
- the second field 215 (having a value 'D' - which is the designator according to search key k 2 ) of the same data structure 210 is accessible by search path that is defined by the search key of record 204.
- the fourth field has a link to the actual data record 202.
- the record DEPOSIT represents subordination of both account and client, whilst avoiding duplication of the fields account, client date and sum.
- data elements account and client are accessed by means of link to the original data records (201 and 202) and the rest of the data (date and sum) exists only once within data element 210.
- data record 210 can include other fields.
- the invention is by no means bound to a given realization and accordingly the manner of realizing data record 210 as depicted in Fig 14 is only one out of many possible variants. The number of search paths is not limited. As had been explained above with reference also to Fig. 13E, if the sought data record is Axxxx (i.e.
- Relation among data elements - Fig. 15 illustrates another feature of the invention, i.e. data relationship feature.
- data record A (a book data record) has C, F, J, K and L data records subordinated thereto.
- the realization of this hierarchy was illustrated above.
- one-to-one and one-to-many relations may easily be realized.
- a book has many categories (L), i.e. one-to-many, however, it has only one abstract (K), i.e. one-to-one.
- a one-to-one data relationship is implemented by a designated (composite) key of two components: the first is the designated key of its subordinating record and the second is the designator of the subordinated record (since it is a one-to-one relation there is no need to use the key field of the subordinated record).
- a one-to-many relationship is implemented by a designator (composite) key whose first component is the designator key of the subordinating record, and whose second component consists of the designator and key of the subordinated record.
- the one-to-one relation between a book and its abstract is maintained by defining the key of L to be AxxxL, where Axxx is the designated key of A, L is the designator of the key of record L.
- the one-to-many relation between a book and a category is maintained by defining the key of L to be AxxxLyyy, where Axxx is the designated key of A, L is the designator of the key and yyy are the key field(s) of record L.
- the relational model considers all data as consisting of tables.
- Each table consists of records of the same structure, called tuples.
- the tuples consist of fields FI, F2 and F3. Each such field is a key. If key F2 is subordinate to key FI, and key F3 is subordinate to key F2, we can easily construct the table: to retrieve its tuples, follow the designator of key FI, and from there for each value of FI, follow the designator of F2, and in the same manner continue to F3.
- Each such triple defines a tuple of the table.
- Some projections are even easier: to find all the pairs of values of FI and F2 for which there exists a value of F3 in the table, we terminate the search after processing (FI, F2).
- the designated index enables to represent additional data models, including . relational database, an object oriented system, and a hierarchical database, where substantially no data is duplicated.
- the object oriented approach considers all data as objects. Every object belongs to a class, which determines its structure and which methods (functions) can be applied to it. The classes are organized in a hierarchy, from which structure and method may be inherited.
- the object-oriented approach is ephemeral — an object exists only while the program that created it is active. Objects that need to be supported for a longer period of time, are defined as persistent. These objects are stored on the disk and are available to other (authorized) programs. The multi-model designated index can easily support such object. Since their structure is uniformly encoded with the aid of designators, later incarnations of the program as well as other programs can access these persistent objects. Note that at the same time a persistent object can also be part of a relational table. There is no need to duplicate data.
- Data records 223, 224, 225, and 226 are subordinated to data record 221 and together with record 221 are considered as an object. It is possible to search efficiently in the index for all data records with a key prefix equals to the designated key of record 221 (partial key search) and retrieve the entire object. If only part of the object's data is needed such as the A type record and the subordinated B type records, again a partial key search is done for data records with key prefix that is equal to the designated key of record type A (for example 221) and the designatore B as the next key field.
- the relational approach considers all data as tables.
- C++ or Java object-oriented programming language
- the object-relational approach provides an interface to convert tables to objects.
- the interface requires the user to specify the relationship between the objects and the table attributes. If some attributes themselves are tables, we need to allow relational algebra operations on these tables too. These conversions are performed by the application program.
- the designated index treats data in a uniform manner, thus providing an ideal interface between the object-oriented application program and the data structures.
- the application program's queries are formulated in terms of designated keys, so the database can optimize the query strategy.
- the database returns designated keys, which the object-oriented application program can readily process by the object-oriented methodology.
- the sequence of designators of the search path to the object determines its class, and the designators to various fields allow the object-oriented program to resolve polymo ⁇ hism of the method calls.
- fig. 16 describes a data structure of an insurance company where records of type A are customers, records of type B are customers claims and records of type C are customers payments. As it is clearly shown, all the data records are addressed by a single index structure.
- the index allows to navigate from a customer to its related data - claims and payments.
- the index structure efficiently and effect the customer table (the collections of records of type A), customer claims table (the collections of records of type A and B) and customers payments table (the collection of records A and C). Since the data structure does not impose physical clustering of the data, if data is shared among different objects, it can be efficiently accessed by the different object views - and thus such data record is a multi-dimension record.
- a claim can be efficiently accessed both from the customer object and the policy object and being from a type structured as for example in fig.16 (structure 210).
- the object-oriented approach allows users to add user-defined types (UDT) and user-defined functions (UDF). For example one could add the photos of accidents to the insurance company database.
- UDT user-defined types
- UDF user-defined functions
- a new designated data record subordinated to the A type data record is defined.
- the photo of the accident is accessed and sent to the photo printout application.
- the new UDT can be based on or be related (by subordination) to any other data type.
- the application can navigate to the new UDT from the defined classes from which the new UDT can inherent methods and other properties. In the example, when navigating in the index, one would navigate to a claim from which one could reach the photo as well as any other part of the claim's data.
- each customer has an address and several loans, while each loan is taken by one or more customers.
- each customer is represented by a node containing link to the customer and links to nodes representing the loans taken by the customer.
- a node representing a loan is likewise linked to the nodes of the customers that took that loan.
- the B-tree implementation requires us to maintain two trees: one of the customers and home addresses, and the second of loans and customers. Thus having retrieved the data of a loan, the names of the customers that took the loan are available. To find their addresses, an independent B-tree search is required for each customer.
- the proposed multi-model designated index (such as for example in fig. 16), once reaching the node representing the loan , one can continue to a designator that identifies the customers that took that loan (for example records of type B). Normally, at most one disk access is required for each customer.
- the proposed multi-dimensional designated index has the advantages of the network model, without its disadvantages. While the network model treated each node separately, and was susceptible to long search paths, the multi-model designated index treats all data uniformly and the length of the search paths in probably logarithmic such that the base of the logarithm is the block size. Thus, in practice, the search requires a single disk access.
- the client-server model enables efficient implementations of the relational model.
- all the data resides at a central computer (called the server), and the application programs run at other computers (called clients).
- clients When an application needs data, it formulates an SQL query, which is sent by the client to the server.
- the server evaluates the query and returns the resulting table to the client.
- the interface between the client and the server is via SQL queries — the server is unaware of the internal data structures and code of the application.
- the client and the server have just to agree on the names of the tables and their attributes.
- this model breaks down. Since each data item is an object, the server must be aware of its internal structure. This problem is aggravated in the presence of polymorphic methods. The server must be aware of the structure and the details of the entire class hierarchy. The designated index allows to apply the client-server approach for the object-oriented and object-relational models. For example, to reach an attribute, the application program sends the path of keys and link designators leading to the desired node to the server. Based on this data the server can fulfill the request without any knowledge of the data structure of the application program.
- the client and the server should agree on the names of the fields and their designators.
- the server need not be aware of the type of data of each such field, and its semantic content.
- the last level of the PAIF index contains a trie with links that point to other trie nodes in the same block, and links that point to records.
- N be the number of records in the database.
- the index contains exactly N pointers to these records. If each pointer requires 4 bytes, the size needed for the pointers is 4N bytes. In addition, each pointer has a direction, (1 byte) thus the total is 5N bytes.
- the method is based on allowing several links to records to share the same pointer.
- the records have fixed size. If the first two records reside in the same block, then it is possible to keep a single full sized pointer for the first pointer to a block, and instead of keeping a pointer for each of the remaining outgoing links to that block, computing their displacement, i.e., if the first two records reside in block number 2000 and the third record in block 7000 it is possible to maintain the structure 2000(e,f) 7000(h).
- the savings would be much more substantial if a larger number of outgoing links point all to the same block.
- fig. 17A shows a node 2000 of a trie with the links 2010, 2011, 2012 (values 5,9,A respectively) that address 3 data records - 2002, 2004, 2006 at disk address 3000, 5000, 7000 respectively.
- the size needed to represent the link values (1 byte for each link) and the pointers (4 bytes) to the data is 15 bytes.
- node 2000 maintains a shared link (2010) to three data records (2002,2004,2006).
- the information that represent the link is the address to block 2020 (4 bytes) and the link values to the data records 2002, 2004, 2006 that reside in the block (1 byte for each link value).
- the size needed to represent the pointer to the data block and the value of the links is only 7 bytes - (3000:5,9,A).
- node 2000 can include links to other data records or data blocks (such as link 2024 to data block 2022 accommodating data record 2008).
- the database file management system of the invention should be associated with known per se concurrency and/or distributed capabilities so as to enable a plurality of users to access virtually simultaneously to the database.
- the database may be located in a central location, or distributed among two or more remote locations.
- Figs. 18A-D there are shown four benchmark graphs demonstrating the enhanced performance, in terms of response time and file size of database utilizing a file management system that employs a system of the invention vs. commercially available Ctree based database.
- the inserts are realized through Uniface application running in Windows (for workgroup) operating system.
- the benchmark of Fig. 18A concerns measuring the time in minutes for inserting an ever increasing number of a priori sorted data records to a file (0-1,000,000). As shown in Fig. 18A, the larger number of inserts the greater is the improvement in terms of response time of the database file management system of the invention. Thus inserting 1 million records takes about 669 minutes in the Ctree based database as compared to only 65 minutes in the system of the invention. Moreover, the response time in the file management system of the invention increases by only a small extent as the number of records increases, as opposed to significant increase in the response time in the counterpart system according to the prior art.
- the benchmark of Fig. 18B illustrates the file size in mega bytes as a function of number of data records in the file (0-1,000,000). As shown in Fig. 18B, the larger number of records the greater is the improvement in terms of file size in the database file management system of the invention. Thus for 1 million records the file size of Ctree based file is about 151 mega byte as compared to only 22 mega byte in the database file management system of the invention.
- Graphs 18C and 18D are similar to those shown in Figs. 18A and 12B apart from the fact that in the former (18C and 18D) the data records are inserted randomly whereas in the latter (18A and 18B) the data records are a priori sorted according to search key. As shown the results are as before i.e. the system of the invention is more efficient in terms of both response time and file size.
- Figs. 19A-D illustrates a benchmark graphs of a system of the invention (operating under DOS operating system) vs. commercially available Btree based database system. The results are as before i.e. the system of the invention is more efficient in terms of both response time and file size.
- the index or layered index of the kind specified above is utilized for efficient representation of directory structures.
- Directories of the kind depicted e.g., in Fig. 20 are very common and are presented to users through various known user interfaces, such as, for example, the Windows Explorer interface.
- the utilization of directories in, say Internet-based-applications has considerably grown recently inter alia due to the fact that arranging data in a hierarchy is a natural way of representing the data in many applications.
- arranging the various items of the catalog in a hierarchy i.e. a directory-like structure, is very convenient to the user who links to the catalog site and searches for an item of interest.
- a common approach of arranging the data in directories uses a low-level multi-way tree index, e.g., the specified B-tree.
- B-tree the significant shortcomings of B-tree approach for representing data has been discussed in detail above.
- index files each being associated with data records that corresponds to directory items in a given level of the directory hierarchy.
- the directory holds three levels, three different index files are employed. This obviously renders the data structure larger and less efficient.
- Figs. 20 and 21 showing an exemplary catalog of items, where a different level of nesting is used for the various items, standing each for directory (d), file (f), picture file (p) and URL link (1). Other types may be used, all as required and appropriate.
- the file that provides information about renting cars in the U.K. belongs to the directory entitled U.K. (item 12), which is subordinate to the directory Europe (10), which, in turn, is subordinate to the directory entitled countries (8).
- the latter is subordinate to directory entitled Transportation (1), that belongs to the root directory Books.
- a lower degree of nesting is illustrated for example, for the directory Maps (3), which has only one file, Europe Roadmap (14).
- each nesting level is represented by a separate index file.
- the key for data record (5) includes the key of the root directory Books (1) concatenated with the key of the sub-directory Agriculture (4) concatenated with the key of sub-directory (5).
- the structure of the directory in Fig. 20 can be presented using for example a Windows Explorer-like user interface.
- Fig. 21 shows the relations among the directory items.
- Each item includes the following fields (from left to right).
- a designator which in this embodiment also signifies the level in the hierarchy of the respective item where "A” stands for the root level, "Z?" for one level below, and onwards.
- the second field defines the item type (" ", " , "/" and "/?”)
- the next field stands for the size of the item name.
- the key for item 1 (Books) is composed of the designator (A) the item type (d) and the item name (Books).
- FIG. 22 there is shown a representation of the specified items as data records in a tri-structure, e.g., in accordance with the PAIF structure, described in WO 98/04980 publication whose contents are inco ⁇ orated herein by reference.
- the root directory Books (1) is associated to node (1107) whose value (9) stands for the discerning offset of the items (Agriculture, Dictionary and Transportation) that are subordinated to Books.
- the PAIF of Fig. 22 is susceptible to unbalanced structure as clearly arises from the left part of the trie (see e.g. data record 15 (1000)) as compared to the right side of the tree, (e.g. data record 14 (1001)).
- WO 98/04980 publication and the present invention describe, in detail, how to render the unbalanced structure balanced.
- the resulting balanced structure is illustrated in Fig. 23. Due to the balanced structure all the records (including records 14 and 15 can be accessed in a balanced manner) .Thus, for example, if block 1010 resides in the main memory, any data record (item of directory) can be accessed using two I/O operations, in contrast to the situation in the unbalanced trie of Fig. 22.
- Data records in the directory may be constitute multi-dimensional records, namely each multi-dimensional record may be through multiple paths.
- item (14) (1001) can be accessed through directory 3 (Maps) or through directories (1 -Books), (1, - Transportation), ( ⁇ -Countries) and (I0-Europe).
- the data that constitute the directory item (e.g. the contents of the Europe Road Map 14) can be of any desired size and does not form part of the directory represntation.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/IL1999/000405 WO2001008045A1 (en) | 1999-07-22 | 1999-07-22 | Method for organizing directories |
Publications (1)
Publication Number | Publication Date |
---|---|
EP1208479A1 true EP1208479A1 (de) | 2002-05-29 |
Family
ID=11062730
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
EP99933107A Withdrawn EP1208479A1 (de) | 1999-07-22 | 1999-07-22 | Verfahren zum organisieren von verzeichnissen |
Country Status (5)
Country | Link |
---|---|
EP (1) | EP1208479A1 (de) |
JP (1) | JP2003505791A (de) |
AU (1) | AU4927599A (de) |
CA (1) | CA2380348A1 (de) |
WO (1) | WO2001008045A1 (de) |
Families Citing this family (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6671694B2 (en) * | 2001-06-04 | 2003-12-30 | Hewlett-Packard Development Company, L.P. | System for and method of cache-efficient digital tree with rich pointers |
KR100843075B1 (ko) | 2006-05-29 | 2008-07-03 | 삼성전자주식회사 | 데이터를 관리하는 장치 및 방법 |
US8204856B2 (en) | 2007-03-15 | 2012-06-19 | Google Inc. | Database replication |
KR100981317B1 (ko) | 2008-03-31 | 2010-09-10 | 이너비트 주식회사 | 소형 무선단말기용 디비엠에스의 그룹핑 분류된 트리구조인덱스 제공방법과 이를 이용한 정보검색방법 |
US8730925B2 (en) | 2009-04-09 | 2014-05-20 | Motorola Mobility Llc | Method and apparatus for generating reference signals for accurate time-difference of arrival estimation |
CN102096711A (zh) * | 2011-01-24 | 2011-06-15 | 四川长虹电器股份有限公司 | 数据库中构建树形结构目录的方法 |
US10223637B1 (en) | 2013-05-30 | 2019-03-05 | Google Llc | Predicting accuracy of submitted data |
US9916357B2 (en) | 2014-06-27 | 2018-03-13 | Microsoft Technology Licensing, Llc | Rule-based joining of foreign to primary key |
US9977812B2 (en) | 2015-01-30 | 2018-05-22 | Microsoft Technology Licensing, Llc | Trie-structure formulation and navigation for joining |
US9892143B2 (en) | 2015-02-04 | 2018-02-13 | Microsoft Technology Licensing, Llc | Association index linking child and parent tables |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
IL118959A (en) * | 1996-07-26 | 1999-07-14 | Ori Software Dev Ltd | Database apparatus |
JP2002501256A (ja) * | 1998-01-22 | 2002-01-15 | オリ・ソフトウェア・ディベロップメント・リミテッド | データベース装置 |
-
1999
- 1999-07-22 CA CA002380348A patent/CA2380348A1/en not_active Abandoned
- 1999-07-22 JP JP2001513062A patent/JP2003505791A/ja active Pending
- 1999-07-22 WO PCT/IL1999/000405 patent/WO2001008045A1/en not_active Application Discontinuation
- 1999-07-22 AU AU49275/99A patent/AU4927599A/en not_active Abandoned
- 1999-07-22 EP EP99933107A patent/EP1208479A1/de not_active Withdrawn
Non-Patent Citations (1)
Title |
---|
See references of WO0108045A1 * |
Also Published As
Publication number | Publication date |
---|---|
CA2380348A1 (en) | 2001-02-01 |
WO2001008045A1 (en) | 2001-02-01 |
JP2003505791A (ja) | 2003-02-12 |
AU4927599A (en) | 2001-02-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6208993B1 (en) | Method for organizing directories | |
US6175835B1 (en) | Layered index with a basic unbalanced partitioned index that allows a balanced structure of blocks | |
AU759360B2 (en) | Database apparatus | |
US6240418B1 (en) | Database apparatus | |
US11899641B2 (en) | Trie-based indices for databases | |
US6029170A (en) | Hybrid tree array data structure and method | |
US7287033B2 (en) | Efficient traversals over hierarchical data and indexing semistructured data | |
US8402071B2 (en) | Catalog that stores file system metadata in an optimized manner | |
US20140297651A1 (en) | Using hash table to retrieve leaf index blocks | |
US6675173B1 (en) | Database apparatus | |
CN101645092B (zh) | 用于将x500数据模型映射到关系数据库上的方法 | |
US7363284B1 (en) | System and method for building a balanced B-tree | |
WO2021016050A1 (en) | Multi-record index structure for key-value stores | |
EP1208479A1 (de) | Verfahren zum organisieren von verzeichnissen | |
CN111984649A (zh) | 数据索引的查找方法、装置和相关设备 | |
US20240054122A1 (en) | Method of building and appending data structures in a multi-host environment | |
EP1116137B1 (de) | Datenbank und entsprechende datenspeicher- und wiederauffindungsmethoden | |
IL137347A (en) | Database apparatus | |
EP1405211A1 (de) | Indizierungsverfahren und system für relationale datenbanken | |
CA2262593C (en) | Database apparatus | |
WO2004023328A1 (en) | Indexed data storage system, method and data structure | |
Litwin et al. | Multilevel trie hashing | |
MXPA00007026A (en) | Database apparatus | |
US20230177034A1 (en) | Method for grafting a scion onto an understock data structure in a multi-host environment | |
Itai et al. | The JS Storage Engine |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PUAI | Public reference made under article 153(3) epc to a published international application that has entered the european phase |
Free format text: ORIGINAL CODE: 0009012 |
|
17P | Request for examination filed |
Effective date: 20020222 |
|
AK | Designated contracting states |
Kind code of ref document: A1 Designated state(s): AT BE CH CY DE DK ES FI FR GB GR IE IT LI LU MC NL PT SE |
|
AX | Request for extension of the european patent |
Free format text: AL;LT;LV;MK;RO;SI |
|
17Q | First examination report despatched |
Effective date: 20040326 |
|
STAA | Information on the status of an ep patent application or granted ep patent |
Free format text: STATUS: THE APPLICATION IS DEEMED TO BE WITHDRAWN |
|
18D | Application deemed to be withdrawn |
Effective date: 20041006 |