Page 123 - DCAP402_DCAO204_DATABASE MANAGEMENT SYSTEM_MANAGING DATABASE
P. 123
Database Management Systems/Managing Database
Notes
Task Create join dependencies.
7.7 Rules about Functional Dependencies
Functional dependencies (FD) are type of constraint that is based on keys. A superkey is defined
as in the relational schema R , where:
a subset K of R is a subkey of R if, in any legal relation r(R), for all pairs, t and t in tuple r such
1 2
that t is not equal to t then t [K] is not equal to t [K].
1 2 1 2
Or, no two rows (tuples) have the same value in the attribute(s) K, which is the key. Now, if there
are two attributes (or sets of attributes) A and B that are legal in the relation schema R, we can
have a functional dependency where
A implies B
for all pairs of tuples such that t [A] is equal to t [A] andt [B] is equal to t [B]. This allows us to
1 2 1 2
state that K is a superkey of R if K implies R. For example, in a relation that has names and social
security numbers, whenever your Social Security number is the student ID, the name in that
tuple can only contain your name. That is because your name is not unique, but your Social
Security is. If I go to the Social Security Administration and search their database for the name
“Gary Burt”, the results is a large number of people. If I search of the social security number
“123-45-6789”, the result is one and only one person.
Another example is in the loan information that we looked at before:
Loan-info-schema = (branch-name, loan-name, customer-name, amount)
it can be shown that the loan-number implies both the amount and the branch-name.It does not
imply the customer-name because there may be more than one person listed on the load, such as
a husband and wife, or parent and child (when the parent co-signs the loan).
Functional dependencies:
1. Specify a set of constraints on a legal relation.
2. Test relations to see if they are legal.
Some relations are said to be trivial when they are satisfied by all relations:
7.8 Database Design Process
The database design process can be divided into six steps. The E-R model is most relevant to the
first three steps.
1. Requirements Analysis: The very first step in designing a database application is to
understand what data is to be stored in the database, what applications must be built on
top of it and what operations are most frequent and subject to performance requirements.
In other words, we must find out what the users want from the database.
2. Conceptual Database Design: The information gathered in the requirements analysis step
is used to develop a high-level description of the data to be stored in the database, along
with the constraints that are known to hold over this data. This step is often carried out
using the E-R model or a similar high-level data model.
116 LOVELY PROFESSIONAL UNIVERSITY