Database Reference
In-Depth Information
Summary
￿
The fundamental capability of a DBMS is to provide users with the ability to update and retrieve data in a
database without users needing to know how data is structured on disk or which processes the DBMS
uses to manipulate the data.
￿
A DBMS must store metadata (data about the data) in a database and make this data accessible to users.
The metadata is stored in a catalog or data dictionary.
￿
A DBMS must support concurrent update, allowing multiple users to update the same database at the
same time. If concurrent update is not handled correctly, updates might be lost, causing the database to
contain invalid data.
253
￿
Locking, which denies access by other users to data while the DBMS processes one user's updates, is
one approach to concurrent update. Two-phase locking includes a growing phase, in which the DBMS
locks more rows and releases none of the locks, followed by a shrinking phase, in which the DBMS
releases all locks and acquires no new locks.
￿
Deadlock
are terms used to describe the situation in which two or more users are each
waiting for the other(s) to release a lock before they can proceed. Enterprise DBMSs have sophisticated
facilities for detecting and handling deadlock. Most PC-based DBMSs do not have such facilities, which
means that programs that access the database must be written in such a way that deadlocks are avoided.
and
deadly embrace
￿
An alternative to two-phase locking is timestamping, in which the DBMS processes updates to a database
in timestamp order.
￿
A DBMS must provide methods to recover a database in the event that the database is damaged in any
way. DBMSs provide facilities for periodically making a backup copy of the database. To recover the data-
base when it is damaged or destroyed, your first step is to copy the backup over the damaged database.
￿
Enterprise DBMSs maintain a log or journal of all database updates since the last backup. If a database is
destroyed, you make the database current from the last backup by using forward recovery to apply the
after images of committed transactions. If you need to remove the updates of incorrect or terminated trans-
actions, you use backward recovery or rollback to apply the before images to undo the updates.
￿
A DBMS must provide security features to prevent unauthorized access, either intentional or accidental, to
a database. These security features include encryption (the storing of data in an encoded form), authenti-
cation (passwords, biometrics, or smart cards to identify users, and database passwords assigned to the
database), authorizations (assigning authorized users to groups that have permissions for accessing the
database), and views (snapshots of certain data in the database that limit a user's access to only the
tables and fields included in the view).
￿
A DBMS must follow rules or integrity constraints so that it updates data accurately and consistently. Key
integrity constraints consist of primary key and foreign constraints. Data integrity constraints help to ensure
the accuracy and consistency of individual fields and include data type, legal-values, and format integrity
constraints.
￿
A DBMS must provide facilities to support the independence of programs from the structure of a database;
data independence
is the term for this capability.
￿
A DBMS must provide a facility to handle replication by managing multiple copies of a database at multiple
locations.
￿
A DBMS must provide a set of utility services that assist in the general maintenance of a database.
Key Terms
after image
authentication
authorization rule
backup
backward recovery
batch processing
before image
biometrics
Search WWH ::




Custom Search