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

1) (DAVID) Q: What is normalization?

A: Normalization is a process for evaluating and correcting table structures to minimize data redundancies,thereby reducing the likelihood of data anomalies (pg 165 textbook International Edition). 2) (DAVID) Q: When is a table 1NF? A: A table is First Normal Form(1NF) when the following three criteria are met: 1) All of the key attributes are defined. 2) There are no repeating groups in the table. 3) All attributes are dependent on the primary key. 3) (DAVID) Q: When is a table 2NF? A: A table is Second Normal Form(2NF) when the following two criteria are met: 1) It is in 1NF. AND 2) It includes no partial dependencies; that is, no attribute is dependent on only a portion of the primary key 4. (Ryan) Q: When is a table 3NF? - A: It is in 2NF and it contains no transitive dependencies. 5. (Ryan) Q: When is a table in BCNF? -A: When every determinant in a table is a candidate key. 6.Given the dependency diagram shown in Figure Q6.6, answer items 6a-6c:

FIGURE Q5.6 Dependency Diagram for Question 6

C1

C2

C3

C4

C5

a. Identify and discuss each of the indicated dependencies. b. Create a database whose tables are at least in 2NF, showing the dependency diagrams for each table. c. Create a database whose tables are at least in 3NF, showing the dependency diagrams for each table.

7. The dependency diagram in Figure Q6.7 indicates that authors are paid royalties for each book that they write for a publisher. The amount of the royalty can vary by author, by book, and by edition of the book.

Figure Q6.7 Book royalty dependency diagram

a. Based on the dependency diagram, create a database whose tables are at least in 2NF, showing the dependency diagram for each table. b. Create a database whose tables are at least in 3NF, showing the dependency diagram for each table

8. The dependency diagram in Figure Q6.8 indicates that a patient can receive many prescriptions for one or more medicines over time. Based on the dependency diagram, create a database whose tables are in at least 2NF, showing the dependency diagram for each table.

Figure Q6.8 Prescription dependency diagram

9. (Ryan) Q: What is a partial dependency? with the normal form is it associated it? - A: A partial dependency is when exists when there is a functional dependence in which the determinant is only part of the primary key. The 2NF would be associated with partial dependency.

10. (Z) Q. What three data anomalies are likely to be the result of data redundancy? How can such anomalies be eliminated? A.Tables can contain insertion, update, or deletion anomalies. Normalizing the table structure will reduce the data redundancies. Splitting up tables to divide the information into separate relational groups reduces data redundancy.

11. (Z) Q:Define and discuss the concept of transitive dependency. -when there are functional dependencies such that XY, YZ, and X is the primary the transitive dependency because X determines the value of Z via Y. A transitive dependency will only occur when a functional dependence exists among nonprime attributes. A transitive dependency exist key. XZ is

12. (Z) Q: What is a surrogate key, and when should you use one? - A surrogate key is a system-defined attribute generally created and managed bai the DBMS. It is usually numeric, and its value automatically increments for each new row. Sometimes a composite primary key may become too cumbersome to use as the number of attributes grows or it may simply have to much descriptive content to be usable in which case a surrogate key is used. 13. Because a partial dependency can only exist if there are several attributes in the primary key. 14.How would you describe a condition in which one attribute is dependent on another attributewhen neither attribute is part of the primary key? This condition is known as a transitive dependency. A transitive dependency is a dependency of onenonprime attribute on another nonprime attribute. (The problem with transitive dependencies is thatthey still yield data anomalies.) 15.Suppose that someone tells you that an attribute that is part of a composite primary key isalso a candidate key. How would you respond to that statement?

This argument is incorrect if the composite PK contains no redundant attributes. If the composite primary key is properly defined, all of the attributes that compose it are required to identify theremaining attribute values. By definition, a candidate key is one that can be used to identify all of theremaining attributes, but it was not chosen to be a PK for some reason. In other words, a candidatekey can serve as a primary key, but it was not chosen for that task for one reason or another. Clearly,a part of a proper (minimal) composite PK cannot be used as a PK by itself.More formally, you learned in Chapter 3, The Relational Database Model, Section 3.2, that a candidate key can be described as a superkey without redundancies, that is, a minimal superkey.Using this distinction, note that a STUDENT table might contain the composite keySTU_NUM, STU_LNAMEThis composite key is a superkey, but it is not a candidate key because STU_NUM by itself is acandidate key! The combinationSTU_LNAME, STU_FNAME, STU_INIT, STU_PHONEmight also be a candidate key, as long as you discount the possibility that two students share the samelast name, first name, initial, and phone number. If the students Social Security number had been included as one of theattributes in the STUDENT table perhaps named STU_SOCSECNUMboth itand STU_NUM would have been candidate keys because either one woulduniquely identify each student. In that case, the selection of STU_NUM as theprimary key would be driven by the designers choice or by end-userrequirements. Note, incidentally, that a primary key is a superkey as well as acandidate key. 16.A table is in ___ 3rd ___ normal form when it is in ___ 2nd normal form___ and there are notransitive dependencies.

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