Вы находитесь на странице: 1из 3

Carla Tolbert

Baker College
9/7/2019
CIS2210
Assignment 2

1. What is an entity supertype, and why is it used?


An entity supertype is a generic entity type that is related to one or more entity subtypes, where
the entity supertype contains the common characteristics and the entity subtypes contain the
unique characteristics of each entity subtype. The reason for using supertypes is to minimize
the number of nulls and to minimize the likelihood of redundant relationships.

2. What kinds of data would you store in an entity subtype?


An entity subtype is a more specific entity type that is related to an entity supertype, where the
entity supertype contains the common characteristics and the entity subtypes contain the
unique characteristics of each entity subtype. The entity subtype will store the data that is
specific to the entity; that is, attributes that are unique the subtype.
3. What is a specialization hierarchy?
depicts the arrangement of higher-level entity supertypes (parent entities) and lower-level
entity subtypes (child entities).
4. What is a subtype discriminator? Given an example of its use.
Attribute in supertype entity Determines to which entity subtype each supertype occurrence is
related, For example, an EMPLOYEE supertype may include the EMP_TYPE value "P" to indicate
the PROFESSOR subtype.

5. What is an overlapping subtype? Give an example.


each entity instance of the supertype may appear in more than one subtype. For example, in a
university environment, In turn, an employee may be a professor as well as an administrator.
6. What is the difference between partial completeness and total completeness?
Partial completeness means that not every supertype occurrence is a member of a subtype;
Total completeness means that every supertype occurrence must be a member of at least one
subtype

7. What is normalization?
evaluating and correcting table structures , minimize data redundancies Reduces data anomalie.

8. When is a table in 1NF?


All key attributes are defined, all remaining attributes are dependent on primary key, no repeating
groups in the table.

9. When is a table in 2NF?


in 1NF , contains no partial dependencies,

10. When is a table in 3NF?


in 2NF ,no transitive dependencies,

11. When is a table in BCNF?


A table is in BCNF when every determinant in a table is a key candidate.

12. Given the dependency diagram shown in Figure Q12.6, answer items 12a-12c:
FIGURE Q12.6 Dependency Diagram for Question 12

C1 C2 C3 C4 C5

a. Identify and discuss each of the indicated dependencies.


C1->C2, C4, C5
C4->C5
There is no incoming edge (arrow in) C1, C2 means there are combined, (C1,C2) are candidate
key.

b. Create a database whose tables are at least in 2NF, showing the dependency diagrams for each
table.
 Rule 1-Bc in 1NF (Each table cell should contain a single value.
 Rule 2-Bc in 2NF (Rule 2 – Single Column Primary Key).

StudentID StudentName ProfessorID ProfessorName


101 Reese, John 201 Cross
102 Brass, Stella 202 Jones
103 McClure, Darla 201 Cross
104 Bard, Martin 201 Cross
 Professor(ProfessorID, ProfessorName)
 STUDENT(StudentID, StudentName, ProfessorID)

(StudentID,ProfessorID) both combined Candidate Key Because No-In coming Edge


StudentID-.StudentName
Professor-.ProfessorName
StudentID StudentName ProfessorID
101 Reese, John 201
102 Brass, Stella 202
103 McClure, Darla 201
104 Bard, Martin 201
ProfessorID ProfessorName
201 Cross
202 Jones

c. Create a database whose tables are at least in 3NF, showing the dependency
diagrams for each table.
 Rule 1-Bc in 1NF (Each table cell should contain a single value).
 Rule 2-Bc in 2NF (Rule 2-Single Column Primary Key).
 Rule 3- has no transitive functional dependencies.
Professor(ProfesssorID), ProfessorName)
STUDENT(StudentID, StudentName, ProfessorID)

This is in 2Normal form but not in 3Normal form because we can see ProfessorID in Student
table is transitive functional dependency because ProfesorName is decomposed.
 Professor((ProfessorID, ProfessorName)
 STUDENT(StudentID, StudentName)
 Std_Prof(StudentID, ProfessorID)

(StudentID,ProfessorID) are combined Candidate Key because there is no incoming edge.

Submit the questions and answers in a Word Document.

Вам также может понравиться