



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




Note: Print your name and NetID in the upper right corner of every page of your submission. Handin your stapled homework to Donna Coleman in 2120 SC. In case Donna is not in office, slide your homework under the door.
To grade homeworks faster, the homework is partitioned into two parts. Please, submit each part separately. For each part, make sure to write down your name and NetID.
There is a bonus credit of 2% if your homework is written by a word processor software and formatted correctly: Each part must be separable so that it can be independently graded. If you submit a paper copy then each part should i) be separately stapled and ii) include your netid.
Expect to lose points if your handwritten answer is unclear or misread by the grader.
Suppose you are hired to develop a geographical information system. Your first task is to develop its databases, with the following information:
Please design and draw an E/R diagram that captures the above information. Note that we can accept that an attribute is a set of values. Also, be careful to indicate any key and participation constraints (multiplicity constraints).
a) Convert the E/R diagram of Problem 1 to a relational database schema. Don’t forget to indicate the keys (by underlining them) for each relation. Note that you don’t need to combine the relations for removing duplications in this problem. (4 points)
b) Convert the treaty, pact, organization, and convention subclass relationships in Problem 2 into relational schema, using the following three approaches: ER approach, Object- Oriented approach, and Null approach. (6 points, 2 points for each approach)
a Assume that your database files are damaged and you do not have any information about the schema of a database. However, you have the values of tables of your database instance. How do you distinguish the candidate keys for each relation us- ing this information.
b What is the minimum and maximum number of super keys in a relation whose number of attributes is n?
c What is the minimum and maximum number of primary keys in a relation whose number of attributes is n?
d Consider a relation with schema R(A,B,C,D) with functional dependencies (FD’s): BC → A, AD → B, CD → B, AC → D. Find all the candidate keys of R.
Consider the relation U niversity as (name, city, departments, f aculties, students).
The following table shows an instance of this relation:
name city departments faculties students UIUC Urbana CS Winslett Rishi UIUC Urbana CS Han Hector UIUC Urbana ECE Winslett Mitra UIUC Urbana CS Han Kim UIUC Urbana ECE Hong Rishi
Provide the BCNF normal form and the 4th normal form for this relation.