Database Reference
In-Depth Information
Tables, segments, or files
Each data item and groups of data items
Data item properties such as type, encoding, and length
Range of values for data items, wherever necessary
Edit rules and error checking rules
Key fields to identify structures independently
Relationships between tables, segments, or files
Unique names for data components
Privacy locks
Data Manipulation Language (DML) Programmers and analysts use DML to
provide data access to users. When you want to write programs to retrieve data from
the database, update data, or delete data, you have to use a data manipulation
language. DMLs contain commands for performing individual data retrieval and
update operations. In practice, DDL and DML usually get integrated into a
single language interface. For example, Structure Query Language (SQL), which
has become the standard for relational DBMSs, includes both DDL and DML
components.
On the basis of the way the language enables programmers to state their data
requests, DMLs may be placed in two distinct groups.
Procedural. When a programmer uses a procedural DML, he or she will have to
write the specific commands and individual steps in proper sequence to perform the
database operation. The programmer will have to give detailed instructions on how
the data retrieval task must be done. You have to write the detailed procedure
specifying the sequence of the explicit instructions. A procedural DML details
how to perform the data access operation, step by step.
Nonprocedural. On the other hand, when a programmer uses a nonprocedural lan-
guage, he or she need not list the individual instructions and the sequence in which
they have to be executed to complete the data retrieval process. It is not necessary
to write detailed procedures. The language is nonprocedural. A nonprocedural
DML just mentions what data are to be retrieved. The implementation of the
language takes care of how the data retrieval will be carried out. Nonprocedural
languages are easier to learn and use.
Data Control Language (DCL) Database administrators have the responsibility
for protecting databases from unauthorized access. They need a language to control
access to the database. First, unauthorized personnel must be kept away from the
database. Second, even for the authorized users, database access must be provided
only for those parts of the database each group is entitled to. Even if a group is
authorized to access certain parts of the database, access privileges may vary. Some
in the group may only retrieve and view the data. Others might be allowed to add
data, and yet a few others may be authorized to update or delete data.
Database administrators use DCL to grant or revoke access privileges to
users. Granting access privileges could involve granting privileges to the entire
Search WWH ::




Custom Search