Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
21 views

Theory Assignment - 1 Question

Uploaded by

vipulkumar3938
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views

Theory Assignment - 1 Question

Uploaded by

vipulkumar3938
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Subject: Introduction to Databases

Subject code: CSE 3151


Theory Assignment 1 Submission Date: 05-04-2024

This assignment is designed to give you practice with the concepts of


 Database design using entity relationship model
 Mapping an ER diagram to relational model
 Constructing schema diagram of a database
 Key terms related to normalization such as functional dependency, attribute closure, canonical
cover etc.
 Designing relational database schema using decomposition and normalization techniques

1. A company-wide information system is maintained to keep up-to-date information on the


processing and current location of each shipped item. Shipped items are characterized by
item_number (which is unique), weight, dimensions, insurance_amount, destination, and final
delivery_date. Shipped items are received at a single retail center. Retail canters are characterized
by their type, uniqueID, and address. Shipped items make their way to their destination via one or
more standard transportation events (i.e., flights, truck deliveries). These transportation events are
characterized by a unique schedule Number, a type (e.g., flight, truck), and a delivery Route. Draw
an Entity Relationship diagram that captures this information about the system indicating the entity
set, relationship set, mapping cardinality and participation constraint.
2. Consider the following ER diagram (Figure 1) and list the entity sets with its attributes and its type,
relationship sets with its degree, mapping cardinality and participation constraints. Translate this
ER diagram to its corresponding relational schema. Also indicate the primary key and foreign key
for the relational schema.

Figure.1
3. Map the following ER diagram (Figure 2) to its corresponding relational schema. Also indicate the
primary key and foreign key for the relational schema.

Figure 2.
4. Draw the schema diagram for the relational schema resulted in question 3.
5. Suppose that we decompose the schema r(A,B,C,D,E) into r1(A,B,C) and r2(A,D,E). Show that
this decomposition is a lossless decomposition if the following set F of functional dependencies
holds:
A BC
CD E
B D
E A
Find the CD+ and E+.

6. Compute the closure of the following set F of functional dependencies for relation schema
r(A, B, C, D, E, F).
A BC
CD E
B D
E A
List the candidate keys for r.
7. Consider the relation schema Student mark (regd, name, course_id, title, grade) with functional
dependency set F= {regdname, course_id title, (regd, course_id) grade}. In what normal
form the relational schema is in? Comment whether it satisfies 2NF or not with reason. If it is not
in 2NF, find the 2NF decomposition of the schema and check the properties of decomposition.

8. Consider the relation schema Book (Title, Author, Catalog_no, Publisher, Year, Price) with
functional dependency set
F= {(Title, Author)  (Catalog_no, Price),
Catalog_noTitle
Catalog_no Publisher,
Catalog_noYear,}
Comment whether it satisfies 3NF or not with reason. If it is not in 3NF, find the 3NF
decomposition of the schema and check the properties of decomposition.

9. Consider the following set F of functional dependencies on the relation schema


r(A, B, C, D, E, G): F = {A → BCD, BC → DE, B → D, D → A}
a) Prove (using Armstrong’s axioms) that AG is a super key.
b) Compute a canonical cover for the above set of functional dependencies F; give each step
of your derivation with an explanation.
c) Give a 3NF decomposition of R based on the canonical cover
d) Find the BCNF decomposition of the schema r.

10. Consider the relation schema r (PAN, PI, DI, DRUG, QTY, COST) with functional dependency set
F= {PAN  PI,
PI  DI,
(PI, DRUG)  QTY,
(DRUG, QTY) COST}

a) Comment whether it satisfies 3NF or not with reason. If it is not in 3NF, find the 3NF
decomposition of the schema and check the properties of decomposition.
b) Comment whether it satisfies BCNF or not with reason. If it is not in BCNF, find the BCNF
decomposition of the schema and check the properties of decomposition.

------------------------------------------------------**End**--------------------------------------------------------------

You might also like