Databases Reference
In-Depth Information
Consider the requirements of a retail business. Sales personnel need general
information about customers and inventory, but only limited information. The
warehouse manager needs different information about inventory, such as sup-
pliers and inventory costs. A database programmer needs a more complete
understanding of the data to know what is available for use in the application
design. A database administrator needs access to all information about any data-
base entities, not just database data, but schema and design information as well.
Data Access
The database approach includes the fundamental operations that can be applied
to data. Every database management system provides for the following data
access basic operations:
READ data contained in the database.
ADD data to the database.
UPDATE individual parts of the data in the database.
DELETE portions of the data in the database.
Database practitioners, who are personnel such as database designers and
programmers, refer to these operations by the abbreviation CRUD:
C: create or add data.
R: read data.
U: update data.
D: delete data.
Transaction Support
Consider the process for entering an order from a customer into the computer
system. The order entry clerk types in the customer number, the product code,
and the quantity ordered. The order entry program retrieves the customer data
so the clerk can verify the customer data, retrieves and displays product infor-
mation and inventory data, and finally completes the order and updates inven-
tory or creates a back order. All these tasks perform a single primary task, enter-
ing a single order comprised of a single order entry transaction. A transaction is
a series of statements or commands that execute as a group, like the statements
represented in Figure 2-2. All of the statements must either run successfully or
all must be rolled back, backing out the results as if the statements were never
run. This compensates for errors that might occur during transaction execution.
When a transaction is initiated it should complete all the tasks and leave the
data in the database in a consistent state. For example, if the initial stock is 1000
units and the order is for 25 units, the stock value stored in the database after
Search WWH ::




Custom Search