Concept explainers
Normalization:
The process used to minimize data redundancy and dependency in a relational
First normal form (1NF):
- If a table does not contain any replicate fields or groups of fields then that model is called as first normal form.
- In this form, entities do not contain any single instance of the repeating variable.
- It means that the entities contain only one instance of the attributes, multi-valued attributes are neglected.
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.
Explanation of Solution
b.
Dependencies diagrams for each database table:
Table1:
Create the database table with name of Table1 is given below:
Table1 (C1, C2)
- C2 are partial dependent on C1.
Normal form:
- The relation is in third normal form (3NF), since there is no transitive dependency and no repeated attributes.
The representation of dependency diagram for table1 is shown below:
Explanation of Solution
c.
Dependencies diagrams for each database table:
Table1:
Create the database table with name of Table1 is given below:
Table1 (C1, C2)
- Here, C1 indicate the primary key.
- C2 are partial dependent on C1.
Normal form:
- The relation is in third normal form (3NF), since there is no transitive dependency and no repeated attributes.
The representation of dependency diagram for table1 is shown below:
Table2:
Create the database table with name of Table2 is given below:
Table2 (C1, C3, C4)
- Here, C1 and C3 indicate the primary key and C1 indicates the foreign key that belongs to Table1 and C4 indicates the foreign key that belongs to Table3...
Trending nowThis is a popular solution!
Chapter 6 Solutions
Database Systems: Design, Implementation, & Management
- Question 2:- The dependency diagram shown 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. ISBN Book Title Author Num LastName Publisher Royalty Edition a) Based on the dependency diagram, create a database whose tables are at least in 2NF, showing the dependency diagram for each table. For full points, make sure to clearly label all partial and transitive dependencies.arrow_forwardRead the following business rules carefully and use common sense when necessary to come up with a good database design as follows: 1- First, develop an ER model. Make sure to use meaningful entity names and relations. 2- Translate ER model into a set of tables, relations and constraints. 3- Label appropriate columns as primary keys and foreign keys. Business rules: A patient can make many appointments with one or more doctors in the clinic, and a doctor can accept appointments with many patients. However, each appointment is made with only one doctor and one patient. Emergency cases do not require an appointment. However, for appointment management purposes, an emergency is entered in the appointment book as “unscheduled.” If kept, an appointment yields a visit with the doctor specified in the appointment. The visit yields a diagnosis and, when appropriate, treatment. With each visit, the patient’s records are updated to provide a medical history Each patient visit…arrow_forwardThe 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 DIAGRAMarrow_forward
- 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.arrow_forward1. what is the relationship between Functional Dependency and Normalization? 2. partial dependency and transitive, give examples of the two relationships. 3. Why do we do the normalization stage in database design, especially in the logical stage?arrow_forwardConsider the following relational schema for a library database: Book (Title, Author, Catalog_no, Publisher, Year, Price, bookCoverType, contractDate) Collection (Title, Author, Catalog_no) Assume {Author, Title} is the key for both relations Additional functional dependencies are Title,Author --> Catalog_no Catalog_no --> Publisher, Year, bookCoverType Publisher, bookCoverType --> Price Author --> contractDate a) Explain what normal form the relation is in. b) Apply normalization until the 3rd State reasons behind each normalizationarrow_forward
- Let us consider the following relational database. Students(stuID, lastName, firstName, major, gpa) Faculty(facID, name, deptName, rank) Classes(classNumber, facID, schedule, room) Enrolls(stuID, classNumber, grade) The column facID of relation Classes that references the table Faculty, The column StuID of relation Enrolls that references table Students, and The column classNunber of relation Enrolls that references table Classes. The following SQL statement is intended to add a record to the table Students. Assume that the entered value for each column is appropriate. In other words, there is no domain constraint violation. INSERT INTO Students(stuID, lastName, firstName, major) VALUES('950555111', 'Anna' 'Smith', 'BSIT'); However, this statement does not work correctly. Briefly explain why and list the correct SQL statement.arrow_forwardThe following tables describe the content of a relational database:arrow_forwardBelow given relations of a database are in First Normal Form (1st NF). Decompose (Split) the relations to Normalize in 2NF and 3NF. tbl Project Project Code Project Name Project Manager Budget Reservation System HR System Attendance System PC010 Mr. Said 25000 PC011 MS. Malak 32000 PC012 Mr. Rajesh 19000 DBMS tbl Emp Dept Project Code Emp No Hourly Pay Emp Name Dept No Dept Name Ali Mohd. PC010 S100 D03 Database 7.500 PC010 S101 Hamood D02 Testing 5.500 PC010 S102 Riyaz D01 IT 8.200 PC011 S103 Pavan D03 Database 6.500 PC011 S104 Basma D02 Testing 5.400 PC011 S115 Asaad D01 IT 7.900 PC012 S137 Fathima D03 Database 6.200 PC012 S218 Avinash D02 Testing 6.100 PC012 S109 Роoja D01 IT 9.300arrow_forward
- Consider the following relational database that represents books, publishers, and books published by publishers. 1) Does this database schema allow for a book to have more than one publisher? Explain why or why not using an example. 2) Does this database schema allow for a book to be currently out of print (not currently being published)? Explain why or why not using an example. 3) List three super keys of the books relation. 4) List all candidate keys of the books relation. 5) List all of the candidate keys of the publishes relation. 6) List all of the superkeys of the publishes relation. 7) Are there any attributes in considered logically non-atomic? Briefly explain why or why not. Assuming tuple (4,83,200,1990) into the publishes table failed. Why did this happen? What database principle was violated? 9) Does the SQL statement ( select title, author from books;) evaluate to a relation? Briefly explain. 10) one web site. the database that could be we have the tables above, inserting…arrow_forwardQUESTION 5 Consider the following relations in a University database: Student (SID, SName, Age, GPA) Course (CID, CName, Lecturer) Enrollment (SID, CID, Grade) SID is the primary key of Student, and CID is the primary key of Course (SID, CID) is the primary key of Enrollment, where SID is the foreign key referencing Student and CID is the foreign key referencing Course. CName is a unique field in the Course relation. Given the following SQL query: SELECT S.SName, E. Grade FROM Student S, Course C, Enrollment E WHERE S.SID = E.SID AND C.CID = E.CID AND C.CName = 'Database'; Show the initial query tree based on the conceptual evaluation strategy. Show the most efficient query tree after applying all the five steps of rule-based query tree optimization. (1) (2) Break up conjunctive selection into a cascade of selection operators; • Push down selection operators; . Convert cross-products into joins; Rearrange leaf nodes to execute the most restrictive selection operators first, Push down…arrow_forwardCreate an ER model related to the following entities and relationships: Department, Student, Professor, Course, Section, Grade, Major. (For attributes inside each table, you only need to insert several reasonable attributes. No need to have a comprehensive list. For many-to-many relationship, you also need to insert one extra table to handle the many-to-many relationship. The final database design will have more tables than the number of entities listed above.) A given department can offer many courses. A given course can be offered by only one related department. A given course can have many related sections. A given professor can teach many sections. A given section can only be related to one course and taught by one professor. A given professor can have appointment with different departments A given department can have many professors. A given department can offer several majors. A given major can be offered by only one related department. A given student can have several majors. A…arrow_forward
- Database Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781305627482Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningFundamentals of Information SystemsComputer ScienceISBN:9781305082168Author:Ralph Stair, George ReynoldsPublisher:Cengage LearningPrinciples of Information Systems (MindTap Course...Computer ScienceISBN:9781285867168Author:Ralph Stair, George ReynoldsPublisher:Cengage Learning
- Database Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781285196145Author:Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos CoronelPublisher:Cengage LearningA Guide to SQLComputer ScienceISBN:9781111527273Author:Philip J. PrattPublisher:Course Technology Ptr