A database is an organized collection of structured
information, or data, typically stored electronically in a computer system. A
database is usually controlled by a database management system (DBMS). Together, the data and the DBMS, along with
the applications that are associated with them, are referred to as a database
system, often shortened to just database.
Data within the most common types of databases in
operation today is typically modeled in rows and columns in a series of tables
to make processing and data querying efficient. The data can then be easily
accessed, managed, modified, updated, controlled, and organized. Most databases
use structured query language (SQL) for writing and querying data.
index is a data structure that improves the speed of data retrieval
operations on a database table at the cost of additional writes and storage space
to maintain the index data structure. Indexes are used to quickly locate data
without having to search every row in a database table every time a database
table is accessed. Indexes can be created using one or more columns of a database table, providing the basis for both rapid
random lookups and efficient access of ordered records.
An index is a copy
of selected columns of data from a table that can be searched very efficiently
that also includes a low-level disk block address or direct link to the
complete row of data it was copied from. Some databases extend the power of
indexing by letting developers create indexes on functions or expressions. For example, an index could be created on
upper(last_name), which would only store the upper-case versions of the last_name field in the index. Another option sometimes supported
is the use of partial indices, where index entries are created only for
those records that satisfy some conditional expression. A further aspect of
flexibility is to permit indexing on user-defined
functions, as well as
expressions formed from an assortment of built-in functions.
Tables, Records, and Fields
A database table is composed of records and fields that hold data.
Tables are also called datasheets. Each table in a database holds data about a
different, but related, subject.
Figure 2 Database Table
Data is stored in records. A record is composed of fields and
contains all the data about one particular person, company, or item in a
database. In this database, a record contains the data for one customer support
incident report. Records appear as rows in the database table. A record for Log
ID 1201242 is highlighted in Figure 3.
Figure 3 Records appear as rows in a database table.
A field is part of a record and contains a single piece of data
for the subject of the record. In the database table illustrated in Figure 4,
each record contains four fields:
number assigned to this customer support incident for identification purposes
code for the customer support operator who handled this incident
check box to indicate whether the incident was resolved
time in seconds the operator spent on this incident
Fields appear as columns in a database table. Data from the Log ID
field for five records is highlighted in the Figure 4.
Figure 4 Fields appear as columns in a database table.