Page 182 - DCAP312_WEB_TECHNOLOGIES_II
P. 182
Web Technologies-II
Notes service representative. Similarly, the physical level of how the data is stored on disk storage
may be hidden from the application programmer. 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.
9.1.5 Data Access
The database approach includes the fundamental operations that can be applied to data. Every
database management system provides for the following 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 functions 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 completed must be
975 units. How can this be a problem? See what can happen in the execution of the transaction.
First, the transaction may not be able to perform all its tasks because of some malfunction
preventing its completion. Second, numerous transactions from different order entry clerks may
be simultaneously looking for inventory of the same product. Database technology enables a
transaction to complete a task in its entirety or back out intermediary data updates in case of
malfunctions preventing completion.
9.2 Hierarchical Database Model
Allow us examine the data necessities for a typical developed company. Typically in
manufacturing, you have major assemblies, with each main congress consisting of subassemblies,
each subassembly consisting of parts, each part consisting of subparts, and so on. In your database
for the developed company, you require to stay put data for the assemblies, subassemblies,
parts, and subparts. And the data model for manufacturing operations must represent these
data necessities.
Think about this data model. This model should show that an assembly contains subassemblies,
a subassembly contains parts, and a part contains subparts. Immediately you can observe that
this data model must be hierarchical in nature, diagramming the assembly at the top with
subassembly, part, and subpart at successive lower levels.
176 LOVELY PROFESSIONAL UNIVERSITY