Database Reference
In-Depth Information
Data Abstraction Consider the example of customer data again. Data about each
customer consist of several fields such as customer name, street address, city, state,
zip code, credit status, and so on. We can look at customer data at three levels. The
customer service representative can look at the customer from his or her point of
view as consisting of only the fields that are of interest to the representative. This
may be just customer name, phone number, and credit status. This is one level. The
next level is the structure of the complete set of fields in customer data. This level
is of interest to the database designer and application programmer. Another level
is of interest to the database administrator, who is responsible for designing the
physical layout for storing the data in files on disk storage.
Now go through the three levels. The customer service representative is just inter-
ested in what he or she needs from customer data, not the entire set of fields or how
the data is physically stored on disk storage. The complexities of the other two levels
may be hidden from the customer service representative. Similarly, the physical level
of how the data is stored on disk storage may be hidden from the application pro-
grammer. Only the database administrator is interested in all three levels. This
concept is the abstraction of data—the ability to hide the complexities of data design
at the levels where they are not required. The database approach provides for data
abstraction.
Data Access The database approach includes the fundamental operations that
can be applied to data. Every database management system provides for the fol-
lowing 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 refer to these operations by the acronym CRUD:
C—Create or add data
R—Read data
U—Update data
D—Delete data
Transaction Support Imagine the business function of 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 reads
the customer data and allows the clerk to sight verify the customer data, reads
product data and displays the product description, reads inventory data, and finally
updates inventory or creates a back order if inventory is insufficient. All these tasks
performed by the order entry program to enter a single order comprise a single
order entry transaction.
When a transaction is initiated it should complete all the tasks and leave the data
in the database in a consistent state. That is, if the initial stock is 1000 units and the
order is for 25 units, the stock value stored in the database after the transaction is
Search WWH ::




Custom Search