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
- What is the cyclomatic complexity of the diagram below, and how did you find it?arrow_forwardWrite the following code segment in MARIE’s assembly language:if X <= Y thenY = Y - 1;else if X != Zthen Y = Y + 1;else Z = Z - 1arrow_forwardA browser’s cache and cookies are used to? a. Keep your identity safe online b. Store information about a site for faster load times c. Act as an online file directory for websites d. Translate webpages from one language to another Which of these passwords meets the most complexity requirements? a. password1 b. Opensaysme c. EzP@ss35! d. PaSsWoRd45 Which of the below is a browser version number? a. Chrome 81.0.4044.129 b. IE Desk 7 c. Firefox iPad d. Google Chrome One Which one of these is an Excel file type? a. .csv b. .docx c. .html d. Python Select the best option for each of the following scenarios. Please use each selection only once. If I needed to communicate to everyone in my company at once, I would go to: __ If I were readying an important presentation, I would go to: __ If I were writing an essay I would go to: __ If I were looking at a lot of data I would go to: __ a. Powerpoint b. Outlook c. Word d. Excel An outdated browser can cause any of the following…arrow_forward
- digital image processing By finding the necessary coding for the symbols according to the given symbol probability table, calculate code symbol for "001000011010000010110011". Note that in the initial state, the probability of 0,55 is expressed as 0 and the probability of 0,45 is 1.What is the last symbol of the result from the Huffman coding?A) a4 B) a6 C)a1 D) a3arrow_forwarddigital image processingWhat is the number of dark small square in set B after (B ⊕X)?a) 29b) 32c) 35d) Otherarrow_forwarddigital image processingWhat is the number of dark small square in set A after (A θ Y)?a) 26b) 24c) 22d) Otherarrow_forward
- digital image processingWhat is the number of dark small square in set A after (A θ X)? a) 22b) 24c) 20d) Otherarrow_forwarddigital image processing By finding the necessary coding for the symbols according to the given symbol probability table, calculate code symbol for "001000011010000010110011". Note that in the initial state, the probability of 0,55 is expressed as 0 and the probability of 0,45 is 1.What is the first symbol of the result from the Huffman coding?A)=a6 B)=a3 C)=a1 D)=a2arrow_forwarddigital image processing(Using the transformation function shown in the figure below, apply contrast stretching for following input image A[2*2]. Where L=256.Find the output image B [2*2].)create output ımage C accordıng to the last three (3) least signifcantbits by bit plane slicing on image Aplease step by explaningarrow_forward
- Given a 16-bit word of 1011011001101001 read from memory, and assuming the original check bits were 10101, apply the Hamming error correction code to: a)Find the new check b)Calculate the syndrome c)Determine whether there is an error in the received word, and if so, correct it to find the original word stored in memoryarrow_forwardThis is a question that I have and would like someone who has experiences with scene graphs and entity component systems to answer.For context, I am currently implementing a game engine and currently I am debating on our current design.Our current design is we have a singular game component class that every component inherits from. Where we have components like SpriteRendererComponent, Mehs Component, etc. They inherit from this GameComponent class. The point of this is being able to have O(1) access to the scene to being able to modify components to attach more components with the idea of accessing those components to specific scene objects in a scene.Now, my question is what kinds of caveauts can this cause in terms of cache coherence? I am well aware that yes its O(1) and that is great but cache coherence is going to be really bad, but would like to know more explicit details and real-life examples such as write in RAM examples on how this is bad. A follow-up question that is part…arrow_forwardQ4: Consider the following MAILORDER relational schema describing the data for a mail order company. (Choose five only). PARTS(Pno, Pname, Qoh, Price, Olevel) CUSTOMERS(Cno, Cname, Street, Zip, Phone) EMPLOYEES(Eno, Ename, Zip, Hdate) ZIP CODES(Zip, City) ORDERS(Ono, Cno, Eno, Received, Shipped) ODETAILS(Ono, Pno, Qty) (10 Marks) I want a detailed explanation to understand the mechanism how it is Qoh stands for quantity on hand: the other attribute names are self-explanatory. Specify and execute the following queries using the RA interpreter on the MAILORDER database schema. a. Retrieve the names of parts that cost less than $20.00. b. Retrieve the names and cities of employees who have taken orders for parts costing more than $50.00. c. Retrieve the pairs of customer number values of customers who live in the same ZIP Code. d. Retrieve the names of customers who have ordered parts from employees living in Wichita. e. Retrieve the names of customers who have ordered parts costing less…arrow_forward
- Database Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781305627482Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningA Guide to SQLComputer ScienceISBN:9781111527273Author:Philip J. PrattPublisher:Course Technology Ptr