database
|
Pg. 01 |
|
Question One |
|
|
|
|
Assignment 2
Deadline: Day 21/11/2019 @ 23:59
[Total Mark for this Assignment is 5]
Fundamentals of Databases
IT403
College of Computing and Informatics
|
|
|
|
|
|
|
|
Question One
2 Marks
Learning Outcome(s):
LO 3 explain the concepts and processes involved in database development.
What do you mean by Lossless-Join Decomposition, give an example of Lossless-Join decomposition of R = (A, B, C) in R1= (A, B) and R2 = (B, C) by drawing tables?
Let r (R) be a relation schema, and let F be a set of functional dependencies on
r (R). Let R1 and R2 form a decomposition of R.We say that the decomposition is
a lossless decomposition if there is no loss of information by replacing r (R) with
two relation schemas r1(R1) andr2(R2).
In other words, if we project r onto R1 and R2, and compute the natural join
of the projection results, we get back exactly r . A decomposition that is not a
lossless decomposition is called a lossy decomposition. The terms lossless-join
decomposition and lossy-join decomposition are sometimes used in place of
lossless decomposition and lossy decomposition.
Question Two
1 Mark
Learning Outcome(s):
LO 3 explain the concepts and processes involved in database development.
Write the USE of multivalued dependencies in two ways Slide 45
The USE of multi-valued dependencies in two ways:---------------
1. To test relations to determine whether they are legal under a given set of functional and multi-valued dependencies
2. To specify constraints on the set of legal relations. We shall concern ourselves only with relations that satisfy a given set of functional and multi-valued dependencies.
Question Three
2 Marks
What are the conditions that must be full fill for 2NF, explain the implications of 1NF?
Learning Outcome(s):
LO 6 create a database application to store and retrieve data.
A relation is in Second Normal Form if:
1. It is in first normal form.
2. All non key attribute fully functionally dependent on the key.
The Implications of 1NF:
The domains of all attributes of R are atomic. (every attribute is single valued for each tuple)
Another Solution حل اخر للجزء الثاني من السؤال
The implication of 1NF is to modify multi valued columns and make sure that each column in a table does not take more than one entry.
eg. in a customer table of customer information, a single field can be allowed to store multiple entries, like where a customer has multiple addresses. This is a violation of the 1NF rules. It can be resolved by creating a customer ID index in the main table and then adding a separate table that has a column for the multiple addresses and another column for the customer ID.