You are on page 1of 2

1. Explain the concept of physical data independence, and its importance in database systems.

Physical data independence is the ability to modify the physical scheme without making it necessary to
rewrite application programs. Such modifications include changing from unblocked to blocked record
storage, or from sequential to random access files. Such a modification might be adding a field to a
record; an application programs view hides this change from the program.

2. List five responsibilities of a database management system. For each responsibility, explain the
problems that would arise if the responsibility were not discharged.

a. interaction with the file manager.


No DBMS can do without this. If there is no file manager interaction then nothing stored in the files can
be retrieved.
b. integrity enforcement.
Consistency constraints may not be satisfied, for example an instructor may belong to a non-existent
department, two students may have the same ID, account balances could go below the minimum
allowed, and so on.
c. security enforcement.
Unauthorized users may access the database, or users authorized to access part of the database may be
able to access parts of the database for which they lack authority. For example, a low-level user could
get access to national defense secret codes, or employees could find out what their supervisors earn
(which is presumably a secret).
d. backup and recovery.
Data could be lost permanently, rather than at least being available in a consistent state that existed
prior to a failure.
e. concurrency control.
Consistency constraints may be violated despite proper integrity enforcement in each transaction. For
example, incorrect bank balances might be reflected due to simultaneous withdrawals and deposits on
the same account, and so on.

3. Consider the bank database of Figure 2.15.

a. What are the appropriate primary keys?


b. Given your choice of primary keys, identify appropriate foreign keys.
Answer:
a. The primary keys of the various schema are underlined. Although in a real bank the customer name is
unlikely to be a primary key, since two customers could have the same name, we use a simplified
schema where we assume that names are unique. We allow customers to have more than one account,
and more than one loan.
branch(branch_name, branch_city, assets)
customer (customer_name, customer street, customer city)
loan (loan_number, branch name, amount)
borrower (customer_name, loan_number)
account (account_number, branch name, balance)
depositor (customer_ name, account_ number)

b. The foreign keys are as follows


i. For loan: branch_name referencing branch.
ii. For borrower: Attribute customer_name referencing customer and loan_number referencing loan
iii. For account: branch_name referencing branch.
iv. For depositor: Attribute customer_name referencing customer and account_number referencing
account