Database Reference
In-Depth Information
NOTE
Deleting data in a database requires user and DBMS processing steps similar to those used to change data. The only differ-
ences occur in Steps 4 and 5 in Figure 7-2. In Step 4, the user requests that the DBMS delete the designated record. In Step
5, the DBMS deletes the record.
Figure 7-3 shows Elena retrieving the balance amount for All Season, a customer in the Premiere Pro-
ducts database. The DBMS finds the All Season record using the same strategy it used when it added the cus-
tomer to the database; Elena doesn
t need to know the strategy the DBMS uses to find and read the data.
After finding and reading the All Season record in the database, the DBMS displays the customer
'
'
s balance
231
amount for Elena.
1. Elena requests
the balance amount for
All Season
Premiere
Products
database
Pr
Pr
Pr
DBMS
DBMS
2. DBMS inds and
reads the data for
All Season
Elena
3. DBMS displays the
balance amount for
All Season
FIGURE 7-3
Retrieving a balance amount from the Premiere Products database
PROVIDE CATALOG SERVICES
A DBMS must store data about the data in a database and make this data accessible to users. Data about
the data in a database, or metadata, includes table descriptions and field definitions. As described in
Chapter 4, the catalog, which is maintained automatically by the DBMS, contains table and field
metadata. In addition, the catalog contains metadata about table relationships, views, indexes, users, privi-
leges, and replicated data; the last three items are discussed later in this chapter.
The catalogs for many DBMSs consist of a set of special tables that are included in the database. The
DBMS hides these special tables from the users of the database. However, the DBMS lets the DBA access and
update the tables because the DBA must know the contents of the database and must create and define
tables, fields, views, indexes, and other metadata. The DBA can authorize access for some catalog tables to
other users as necessary.
NOTE
In some database systems, such as Microsoft Access, users can access and update the metadata about the fields, tables, rela-
tionships, and indexes in a database. However, individuals and companies that create databases for other people usually hide
this metadata so that users cannot access or update the metadata.
When the DBA uses the DBMS to access the catalog in the database, the DBA asks questions such as the
following:
￿
What tables and fields are included in the database? What are their names?
￿
What are the properties of these fields? For example, is the Street field in the Customer table 15
or 30 characters long? Is the CustomerNum field a numeric field, or is it a character field? How
many decimal places are in the Rate field in the Rep table?
￿
What are the possible values for the various fields? For example, are there any restrictions on
the possible values for the CreditLimit field in the Customer table or for the Class field in the
Part table?
Search WWH ::




Custom Search