Database

From Wikipedia

HomePage | Recent changes | View source | Discuss this page | Page history | Log in |

Printable version | Disclaimers | Privacy policy

A database is a collection of information which is organized for flexible searching and utilization. There are a wide array of databases, from simple examples such as simple tabular collections to much more complex models such as the relational database model.

The types of database are distinguished by many characteristics. One commonly used characteristic is the programming model associated with the database. Several models have been in wide use for some time.

The flat (or table) model is basically a two-dimensional array of data elements, where all members of a given column are assumed to be similar values, and all members of a row are assumed to be related to one another. For instance, columns for name and password might be used as a part of a system security database. Each row would have the specific password associated with a specific user. Columns of the table often have a type associated with them, defining them as character data, date or time information, integers, or floating point numbers.

The network model expands on the flat model by allowing the addition of multiple tables. A table column type can be defined as a reference to one or more entries of a different table. Thus, the tables are related by references, which can be viewed as a network structure. A particular subset of the network model, the hierarchical model, limits the relationships to a tree structure, instead of the more general directed graph structure implied by the full network model.

Relational databases are similar to network databases, in that they can contain several tables. Unlike network databases, however, the relations between tables are not explicitly encoded in the definition of the tables. Instead, the presence of columns whose name and type are identical implies a relationship between the tables. A mathematical model, known as the relational calculus, implies a set of consistent operations that can be performed on such databases. As a result, relational databases can be flexibly reorganized and reused in ways their original designers did not foresee. Many business and personal databases use the relational model, because of this flexibility.

All of these kinds of database can take advantage of indexing to increase their speed. An index is a sorted list of the contents of some particular table column, with pointers to the row associated with the value. An index allows a set of table rows matching some criterion to be located quickly. Various methods of indexing are commonly used, including b-trees, hashes, and linked lists are all common indexing techniques.

In recent years, the object-oriented paradigm has been applied to databases as well, creating a new programming model known as object databases. Objects are very similar to table rows in the other models, and the columns of a table are very similar to the data definitions included as a part of an object class definition. In addition, the object database includes stored behaviors, which can be triggered when operations are performed on the object. Object databases and relational databases have become very similar over time, and object systems today are often implemented atop a relational database foundation.

Databases are used in many applications, spanning virtually the entire range of computer software. Databases are the preferred method of storage for large multiuser applications, where coordination between many users is needed. Even individual users find them convenient, though, and many electronic mail programs and personal organizers are based on standard database technology.

See also: