How a Database Stores Data


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.

Legal Disclaimer

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

Related Articles

1. Basic SQL syntax: Creating and Modifying tables and databases
This tutorial shows basic syntax and commands and of the SQL language. Creating and Dropping Databases First, let's see what databases already exist ...

2. Introduction to SQL
SQL is an acronym for Structured Query Language and is the standard language for interaction with databases. SQL is both an ISO (International Organization for Standard...

3. What Is a Database
A database is simply an organized collection of information. It allows many different types of data to be stored and retrieved in a highly efficient manner. Info...

4. Installing MySQL Server
Installing MySQL is relatively painless. First, you need the installation program for MySQL, which is available on the companion CD. You can also download the latest ve...

5. Data Entry and the Various Industries that use this Service
Group of people flooding Excel sheets with alpha and numeric characters... spontaneous sound of pressing keyboards... these are what you will find in data entry service. Fr...

6. Different Forms and Variations of Data Entry
Data entry is the procedure of feeding data into spreadsheets and database. It can either be done automatically by a machine that keeps on adding data in the database, or m...

7. How Data Entry Services Benefit Industries And Why It Is Essential
It is irrelevant whether you have a small business or a global empire - information is an asset in any kind of business. And when it is business, everything comes down to p...

8. How to check Oracle processes in windows using command line
Is there any command in Windows like ps command in Unix? How to check Oracle processes in windows. This is burning problem for every Oracl...

9. What is meant by dirty data
Suppose you have leads or contacts in your CRM system that are missing key information, have bounced email addresses, are just plain incor...

10. Software and Databases Managers
Software's cause for being is juggling. Whether the information are terms, facts, or quantities, software finds new methods to compare, sort, purchase, merge, separate, a...