Concept explainers
a.
Normalization:
The process used to minimize data redundancy and dependency in a relational
Second normal form (2NF):
- The value of all non-primary key attributes should be dependent on the primary key attribute.
- If any attribute is depending on the partial primary key then it should determine the other attributes for an instance of the entity.
- The partial dependencies should be removed from the data model.
Third normal form (3NF):
- The value of any non-primary key attributes will not depend on any other non-primary key attributes.
- If any non-primary key attributes depend on any other non-primary key attribute then it should be moved or deleted.
- It is termed as transitive dependency.
Partial dependency:
A partial dependency exists at that time of an attributes depends only a part of primary key. This dependency is related with 1st normal form.
Transitive dependency:
A transitive dependency exists at that time of an attributes depends on another attribute which is not part of primary key.
Functional dependency:
An association between two attributes or two set of attributes in a same relational database table, which is having some constraints is known as functional dependency.
- In a table one attribute is functionally dependent on another attribute to take one value.
a.
Explanation of Solution
Construct the dependency diagram with all partial and transitive dependencies:
The relational schema for given STUDENT table is given below:
STUDENT(STU_NUM, STU_LNAME, STU_MAJOR, DEPT_CODE, DEPT_NAME,
DEPT_PHONE, ADVISOR_LNAME, ADVISOR_OFFICE, ADVISOR_BLDG, ADVISOR_PHONE, STU_GPA, STU_HOURS, STU_CLASS)
- Here, “STU_NUM” indicates the primary key.
The representation of dependency diagram with all transitive dependencies is shown below:
Explanation:
In the above dependency diagram,
- The transitive dependency is,
DEPT_CODE -> (DEPT_NAME, DEPT_PHONE, COLLEGE_NAME)
ADV_OFFICE -> (ADV_BUILDINGS)
STU_HOURS -> (STU_CLASS)
b.
Normalization:
The process used to minimize data redundancy and dependency in a relational database is known as normalization. The database table is divided into two or more tables and defines the relationship between those tables.
Second normal form (2NF):
- The value of all non-primary key attributes should be dependent on the primary key attribute.
- If any attribute is depending on the partial primary key then it should determine the other attributes for an instance of the entity.
- The partial dependencies should be removed from the data model.
Third normal form (3NF):
- The value of any non-primary key attributes will not depend on any other non-primary key attributes.
- If any non-primary key attributes depend on any other non-primary key attribute then it should be moved or deleted.
- It is termed as transitive dependency.
Partial dependency:
A partial dependency exists at that time of an attributes depends only a part of primary key. This dependency is related with 1st normal form.
Transitive dependency:
A transitive dependency exists at that time of an attributes depends on another attribute which is not part of primary key.
Functional dependency:
An association between two attributes or two set of attributes in a same relational database table, which is having some constraints is known as functional dependency.
- In a table one attribute is functionally dependent on another attribute to take one value.
b.
Explanation of Solution
Construct the dependency diagram:
The new dependency diagram is represented by removing all transitive dependencies in STUDENT table.
First table:
The relational schema for first table is given below:
STUDENT(STU_NUM, STU_LNAME, STU_MAJOR, DEPT_CODE, ADVISOR_NUM STU_GPA, STU_HOURS, STU_CLASS)
- Here, “STU_NUM” indicates the primary keys and “ADVISOR_NUM” indicates the foreign key.
- The relation is in third normal form (2NF), since there is transitive dependency in this table.
The representation of dependency diagram in first table is shown below:
Second table:
The relational schema for second table is given below:
MAJOR(MAJOR_CODE, DEPT_CODE, MAJOR_DESCRIPTION)
- Here, “MAJOR_CODE” indicates the primary key.
- The relation is in third normal form (3NF), since there is no transitive dependency and no repeated attributes.
The representation of dependency diagram in second table is shown below:
Third table:
The relational schema for third table is given below:
BUILDING(BLDG_CODE, BLDG_NAME, BLDG_MANAGER)
- Here, “BLDG_CODE” indicates the primary key.
- The relation is in third normal form (3NF), since there is no transitive dependency and no repeated attributes.
The representation of dependency diagram in third table is shown below:
Fourth table:
The relational schema for fourth table is given below:
DEPARTMENT(DEPT_NAME, DEPT_PHONE, COLL_CODE)
- Here, “DEPT_NAME” indicates the primary key.
- The relation is in third normal form (3NF) but it does not meet the BCNF, since there is no transitive dependency and no repeated attributes.
The representation of dependency diagram in fourth table is shown below:
Fifth table:
The relational schema for fifth table is given below:
COLLEGE(COLL_CODE, COLL_NAME)
- Here, “COLL_CODE” indicates the primary key.
- The relation is in third normal form (3NF), since there is no transitive dependency and no repeated attributes.
The representation of dependency diagram in fifth table is shown below:
Sixth table:
The relational schema for sixth table is given below:
ADVISOR(ADV_NUM, ADV_LASTNAME, ADV_OFFICE, ADV_BUILDING, ADV_PHONE)
- Here, “ADV_NUM” indicates the primary key.
- The dotted transitive dependency line specifies that dependency is interpretation.
- The relation is in third normal form (2NF), since there is transitive dependency in this table.
The representation of dependency diagram in sixth table is shown below:
c.
Explanation of Solution
The representation of Crow’s Foot Entity Relational Diagram (ERD) is shown below:
The following data model shows the solution for the given question.
Explanation:
- In the above data model, the college owns more than one department.
- The “COLLEGE” entity contains the “COLL_CODE” and “COLL_NAME” attributes.
- The primary key of “COLL_CODE” entity is “INV_NUM”.
- The “DEPARTMENT” entity contains the “DEPT_CODE”, “DEPT_NAME”, “DEPT_PHONE” and “COLL_CODE” attributes.
- The primary of this entity is “DEPT_CODE”.
- The foreign key of this entity is “COLL_CODE”.
- The “COLLEGE” entity contains the “COLL_CODE” and “COLL_NAME” attributes.
- The department offers more than one major.
- The “MAJOR” entity contains the “MAJOR_CODE”, “MAJOR_NAME”, and “DEPT_CODE” attributes.
- The primary key of “MAJOR_CODE” for this entity.
- The foreign key of this entity is “VEND_CODE”.
- The “MAJOR” entity contains the “MAJOR_CODE”, “MAJOR_NAME”, and “DEPT_CODE” attributes.
- The major attracts more than one student.
- The “STUDENT” entity contains the “STU_NUM”, “STU_LNAME”, “STU_CLASS”, “STU_HOURS”, “STU_GPA”, “MAJOR_CODE”, and “ADV_NUM” attributes.
- The primary key of “STU_NUM” entity.
- The foreign key of this entity is “MAJOR_CODE” and “ADV_NUM”.
- The “STUDENT” entity contains the “STU_NUM”, “STU_LNAME”, “STU_CLASS”, “STU_HOURS”, “STU_GPA”, “MAJOR_CODE”, and “ADV_NUM” attributes.
- The building houses more than one advisor.
- The “ADVISOR” entity contains the “ADV_NUM”, “DEPT_CODE”, “BLDG_CODE”, “ADV_LNAME”, “ADV_OFFICE”, and “ADV_PHONE” attributes.
- The primary key of “ADV_NUM” entity.
- The foreign key of this entity is “DEPT_CODE” and “BLDG_CODE”.
- The “BUILDING” entity contains the “BLDG_CODE”, “BLDG_NAME” and “BLDG_MANAGER” attributes.
- The primary key of “BLDG_CODE” entity.
- The “ADVISOR” entity contains the “ADV_NUM”, “DEPT_CODE”, “BLDG_CODE”, “ADV_LNAME”, “ADV_OFFICE”, and “ADV_PHONE” attributes.
- The advisor advises more than one student.
Want to see more full solutions like this?
Chapter 6 Solutions
Database Systems: Design, Implementation, & Management
- Using the STUDENT table structure shown in Table 1, do the following:a. Write the relational schema and draw its dependency diagram. Identify alldependencies, including all transitive dependencies. [5 marks]b. Write the relational schema and draw the dependency diagram to meet the3NF requirements to the greatest practical extent possible. If you believe thatpractical considerations dictate using a 2NF structure, explain why yourdecision to retain 2NF is appropriate. If necessary, add or modify attributesto create appropriate determinants and to adhere to the naming conventions.[10 marks]c. Using the results of Problem b, draw the Crow’s Foot ERD. [5 marks]TABLE 1: STUDENT INFOATTRIBUTENAMESAMPLEVALUESAMPLEVALUESAMPLEVALUESAMPLEVALUESAMPLEVALUESTU_NUM 211343 200128 199876 198648 223456STU_LNAME Stephanos Smith Jones Ortiz McKulskiSTU_MAJOR Accounting Accounting Marketing Marketing StatisticsDEPT_CODE ACCT ACCT MKTG MKTG MATHDEPT_NAME Accounting Accounting Marketing Marketing Mathematicsarrow_forwardUsing the invoice table stucture do the following:a.Write the relational schema ,draw its dependency diagram,and identy all dependencies,including all partial and transitive dependencies.You can assume that the table does not contain repeating groups and that an invoice number references more than one product.b.Remove all partial dependencies,write the relational schema,and draw the new dependency diagrams.Identify the normal forms for each table structure you created.c.Remove all transitive dependencies,write the relational schema,and draw the new dependency diagrams.Also identify the normal forms for each table structure you created.d.Draw the Crow's Foot ERD.arrow_forwardTo keep track of office furniture, computers, printers, and other office equipment, the FOUNDIT Company uses the table structure shown in Table P6.5.a. Given that information, write the relational schema and draw the dependency diagram. Make sure that you label the transitive and/or partial dependencies.b. Write the relational schema and create a set of dependency diagrams that meet 3NF requirements. Rename attributes to meet the naming conventions, and create new entities and attributes as necessary.c. Draw the Crow's Foot ERD.To upload and submit your assignment, click the Choose File button below to find and select your saved document. Make sure that the file is saved with your last name in the file name. (Example: ch6_problem1_Jones.doc)arrow_forward
- 4- To keep track of office furniture, computers, printers, and other office equipment, the FOUNDIT Company uses the table structure shown below. a. Given that information, write the relational schema and draw the dependency diagram. Make sure that you label the transitive and/or partial dependencies. b. Write the relational schema and create a set of dependency diagrams that meet 3NF requirements. Rename attributes to meet the naming conventions, and create new entities and attributes as necessary. Attribute Name Sample Value ITEM_ID ITEM_LABEL BLDG_CODE ROOM_NUMBER 325 BLDG_NAME 231134-678 BLDG_MANAGER HP DeskJet 895Cse NTC Nottooclear I. B. Rightonit Sample Value 342245-225 HP Toner 325 NTC Nottooclear I. B. Rightonit Sample Value 254668-449 DT Scanner 123 CSF Canseefar May B. Nextarrow_forwardUsing the STUDENT table structure in picture, do the following: 1. Write the relational schema, draw its dependency diagram and identify all dependencies, including all partial and transitive dependencies. You can assume that the table does not contain repeating groups and that any invoice number may reference more than one product. (Hint: This table uses a composite primary key.) 2. Remove all partial dependencies, write the relational schema, and draw the new dependency diagrams. Identify the normal forms for each table structure you created. 3. Remove all transitive dependencies, write the relational schema, and draw the new dependency diagrams. Also identify the normal forms for each table structure you created. 4. Draw the Crow’s Foot ERD.arrow_forwardThe table structure shown in Table P6.6 contains many unsatisfactory components and characteristics. a. Given the structure shown in Table P6.6, write the relational schema and draw its dependency diagram. Label all transitive and/or partial dependencies.b. Draw the dependency diagrams that are in 3NF. (Hint: You might have to create a few new attributes. Also make sure that the new dependency diagrams contain attributes that meet proper design criteria; that is, make sure there are no multivalued attributes, that the naming conventions are met, and so on.)c. Draw the relational diagram.d. Draw the Crow's Foot ERD.arrow_forward
- Using the INVOICE table structure shown in table P6.3, do the following a. Write the relational schema, draw its dependency diagram, and identify all dependencies, including all partial and transitive dependencies. You can assume that the table does not contain repeating groups and that an invoice number references more than one product. (Hint: This table uses a composite primary key.) b.Remove all partial dependencies, write the relational schema, and draw the new dependency diagrams. Identify the normal forms for each table structure you created. Note You can assume that any given product is supplied by a single vendor, but a vendor can supply many products. Therefore, it is proper to conclude that the following dependency exists: PROD_NUM -+ PROD_LABEL, PROD_PRICE,VEND_CODE, VEND_NAME ( Hint Your actions should produce three dependency diagrams.) c. Remove all transitive dependencies, write the relational schema, and draw the new dependency diagrams. Also, identify the normal…arrow_forwarda) Consider the following EER diagram. Map it to the relational model. Specify the relational schema in DBDL notation. b) Convert the following relational schema to BCNF (FD1, FD2 and FD3 are functional dependencies. CourseOffering(coId, courseId, semesterId, year, campus, courseName) Primary key (coId) Alternate Key (courseId, semesterId, year, campus) FD1: coId courseId, semesterId,arrow_forwardWhat is the most common method of specifying a primary key in a relational schema description? Group of choice: A. by enclosing the key attributes in parentheses B. by stating the key attributes first in the relation definition C. by writing key attributes in all capital letters D. by italicizing the key attributes E. by underlining the attributes that comprise the primary keyarrow_forward
- I got stuck on step one through four. I was wondering if you guys know how. each step says: Write the relational schema for the data in its current form. Identify all partial dependencies and transitive dependencies for the data in its current form. Write the relational schema to meet 3NF requirements to the greatest extent possible. If necessary, add or modify attributes to create appropriate determinants, create appropriate foreign keys, and to adhere to naming conventions. Analyze the given data and identify the business rules reflected in the data.arrow_forwardLab 3: Normalization Assignment: Problem #11 from Chapter #6. (Be sure to note that this is PROBLEM and not REVIEW QUESTION). Normalize a set of data to 1st, 2nd and 3rd normal form by creating relational schemas, dependency diagrams and an Entity Relationship Diagram (crow’s foot notation). For this lab, complete problem #11 in Chapter 6. Be sure to complete each letter (a thru c) for the problem. The ERD for letter cmust be completed with the use of Microsoft Visio. Remember to include headers on all documents you submit to include a brief descriptive title, your name and a date. Question 11: Given the sample records in the CHARTER table shown in Table P6.11, do the following: Write the relational schema and draw the dependency diagram for the table structure. Make sure that you label all dependencies. CHAR_PAX indicates the number of passengers carried. The CHAR_MILES entry is based on round-trip miles, including pickup points. (Hint: Look at the data values to determine the…arrow_forward4-44. Figure 4-35 shows an EER diagram for Vacation Property Rentals. This organization rents preferred properties in several states. As shown in the figure, there are two basic types of properties: beach properties and mountain properties. Transform the EER diagram to a set of relations and develop a relational schema. Diagram the functional dependencies and determine the normal form for each relation. Convert all relations to third normal form, if necessary, and draw a revised relational schema. Suggest an integrity constraint that would ensure that no property is rented twice during the same time interval.arrow_forward
- A Guide to SQLComputer ScienceISBN:9781111527273Author:Philip J. PrattPublisher:Course Technology PtrDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781305627482Author:Carlos Coronel, Steven MorrisPublisher:Cengage Learning