To index data, the databases manager very first requires you to tell it on which of the fields the index would be to be based. This field is called the crucial field. Some databases can have a lot more than one index and a lot more than one crucial field.
IE] The database manager reads every report and constructs a temporary file consisting of the values contained in each record's key field and corresponding pointers that give the location of every report within the databases file. If duplicate values are discovered, every duplicate entry is recorded within the index file.
Following the databases program has read all of the values and their pointers, or report numbers, into the temporary file, it arranges the copied values in alphanumeric order, making an index.
The databases writes the ordered information to an index file that is structured like a binary tree. The binary tree, or b-tree, is designed to rate up the process of finding information within the index file. It is an upside-down tree by which each node has two branches. These branches break logical divisions from the index file into progressively more compact halves.
For example, A-M represents one of the very first two branches from the tree and N-Z represents one other primary branch. A b-tree lookup lets a databases search a million-entry index by checking only 20 sets of nodes instead of every from the one million nodes. When the database manager requirements to discover data based about the key area, it checks successive branches of the b-tree.
Because I comes prior to M in the alphabet, the manager next appears at the A-B key-field values halfway between A and M. There, it finds values beginning with G. I arrives after G, so the manager looks halfway between G and M, and so forth, till it finds values starting with I.
Eventually, the manager arrives at an end node-the leaf, so to speak-which contains a short, fixed amount of entries (eight or so, depending about the program) and their pointers. It finds the entry it has been searching for and utilizes the pointer to locate the actual record in the database table.
To re-index the database after new data happen to be additional to the databases, the program puts every new index entry into a blank space below the correct "Ieaf" within the index's b-tree.
If there's no room below the leaf, the software produces two new nodes under what had been the last node. For instance, an L node would be divided into an LA-LK node and an LL-LZ node, every of which would receive roughly half of the parent node's information.
Our website is not responsible for the information contained by this article. Webworldarticles.com is a free articles resource thus practically any visitor can submit an article. However if you notice any copyrighted material, please contact us and we will remove the article(s) in discussion right away.
This article was sent to us by:
Torra Gregorian at
08312010
1. Basic SQL syntax: Creating and Modifying tables and databases
All articles in this directory are property of their respective authors. Additionally, read our Privacy Policy
© 2010 WebWorldarticles.com - All Rights Reserved. Partners: Gunblade Saga