A Guide to SQL
9th Edition
ISBN: 9781111527273
Author: Philip J. Pratt
Publisher: Course Technology Ptr
expand_more
expand_more
format_list_bulleted
Expert Solution & Answer
Chapter 2, Problem 11RQ
Explanation of Solution
Functional dependencies:
Functional dependency is a term in the relational
Explanation of Solution
Database:
The given database comprises of the following tables with the respective columns as shown below.
- DEPARTMENT – DEPARTMENT NUM, DEPARTMENT_NAME
- ADVISOR – ADVISOR_NUM, ADVISOR_LAST_NAME,ADVISOR_FIRST_NAME,DEPARTMENT_NUM
- COURSE – COURSE_CODE, DESCRIPTION
- STUDENT – STUDENT_NUM, STUDENT_LAST_NAME,STUDENT_FIRST_NAME, ADVISOR_NUM
Relations:
The term relation refers to the relationship between the data represented in row-column format...
Program Plan Intro
Entity Relationship Diagram (ERD):
Entity relationship diagram is basically a picture or snapshot about the business system. It means that the information stored and created is represented by this diagram.
- Entities may represent the physical object, event, or concept.
- An attribute is a property of an entity.
- Relationship denotes the link between the entities.
- If an independent child entity is present in a relationship then it is called a non-identifying relationship.
- If a dependent child entity is present in a relationship then it is called a non-identifying relationship.
Expert Solution & Answer
Trending nowThis is a popular solution!
Students have asked these similar questions
A database at a college must support the following requirements:
a. For a department, store its number and name.
b. For an advisor, store his or her number, last name, first name, and the department number to which the advisor is assigned.
c. For a course, store its code and description (for example, DBA210, SQL Programming).
d. For a student, store his or her number, first name, and last name. For each course the student takes, store the course code, course description, and grade earned. Also, store the number and name of the student's advisor. Assume that an advisor might advise any number of students but that each student has just one advisor.
Design the database for the preceding set of requirements. Determine any functional dependencies. List the tables, columns, and relationships. In addition, represent your design with an E-R diagram.
Design a database that can satisfy the following requirements:
a. For each marina, list the number, name, address, city, state, and zip code.
b. For each boat owner, list the number, last name, first name, address, city, state, and zip code.
c. For each marina, list all the slips in the marina. For each slip, list the length of the slip, the annual rental fee, the name and type of the boat occupying the slip, and the boat owner’s number, last name, and first name.
d. For each possible service category, list the category number and description. In addition, for each service request in a category, list the marina number, and slip number for the boat receiving the service, the estimated hours for the service, the hours already spent on the service, and the next date that is scheduled for the particular service.
The following four tables form part of a library database:
• Book (isbn, title, author, genre, price)
• Copy (copyId, isbn)
• Loan (userId, copyId, loanDate, dueDate)
• User (userId, name, address, email)
Where:
• Book contains details of books and isbn is the primary key• Copy contains details of individual copies of books and copyId is the primary key• Loan contains details of loans and (userId, copyId, loanDate) forms the primary key • User contains details of library users and userId is the primary key
3.1 Identify the primary in the above schema.
3.2 Identify the foreign keys in the above schema.
3.3 Draw an Entity relationship model (ER-model) for the above schema, including:
• all attributes• correct notation for primary and foreign keys
• relationships• multiplicities
3.4 Draw sample tables for the above relations, ensuring relational integrity rules are met.
3.5 Explain the Entity Integrity constraint with reference to the Book relation.
Chapter 2 Solutions
A Guide to SQL
Ch. 2 - Prob. 1RQCh. 2 - What is an attribute?Ch. 2 - What is a relationship? What is a one-to-many...Ch. 2 - Prob. 4RQCh. 2 - What is a relation?Ch. 2 - Prob. 6RQCh. 2 - Prob. 7RQCh. 2 - How do you qualify the name of a field, and when...Ch. 2 - Prob. 9RQCh. 2 - What is a primary key? What is the primary key for...
Ch. 2 - Prob. 11RQCh. 2 - Prob. 12RQCh. 2 - Define second normal form. What types of problems...Ch. 2 - Define third normal form. What types of problems...Ch. 2 - Prob. 15RQCh. 2 - Prob. 16RQCh. 2 - List the changes you would need to make to your...Ch. 2 - Prob. 1TDCh. 2 - Prob. 2TDCh. 2 - Prob. 3TDCh. 2 - Prob. 4TDCh. 2 - Prob. 5TDCh. 2 - Prob. 1CATCh. 2 - Identify the functional dependencies in the...Ch. 2 - Prob. 3CATCh. 2 - Determine the functional dependencies that exist...Ch. 2 - Prob. 2SCGCh. 2 - Prob. 3SCG
Knowledge Booster
Similar questions
- Access path A database table is composed of records and fields hold data. Data is stored in records. A field is a part of a record and contains a single piece of data for the subject of the record. The access path for finding the list of books is AUTHOR: AuthorID, Lname BOOKAUTHOR: AuthorID, ISBN BOOKS: Pubdate, ISBNarrow_forwardAn EMPLOYEES table was added to the JustLee Books database to track employee information. Display a list of each employee’s name, job title, and manager’s name. Use column aliases to clearly identify employee and manager name values. Include all employees in the list and sort by manager name.arrow_forwardThe following tables provide a very small portion of the data that will be kept in the database. These data need to be inserted into the database for testing purposes. Write the INSERT commands necessary to place the following data in the tables that were created in Problem 65. RENTAL RENT_NUM RENT_DATE MEM_NUM 1001 01-MAR-13 103 1002 01-MAR-13 105 1003 02-MAR-13 102 1004 02-MAR-13 110 1005 02-MAR-13 111 1006 02-MAR-13 107 1007 02-MAR-13 104 1008 03-MAR-13 105 1009 03-MAR-13 111 VIDEO VID_NUM VID_INDATE MOVIE_NUM 54321 18-JUN-12 1234 54324 18-JUN-12 1234 54325 18-JUN-12 1234 34341 22-JAN-11 1235 34342 22-JAN-11 1235 34366 02-MAR-13 1236 34367 02-MAR-13 1236 34368 02-MAR-13 1236 34369 02-MAR-13 1236 44392 21-OCT-12 1237 44397 21-OCT-12 1237 59237 14-FEB-13 1237 61388 25-JAN-11 1239 61353 28-JAN-10 1245 61354 28-JAN-10 1245 61367 30-JUL-12 1246 61369 30-JUL-12 1246arrow_forward
- An in-memory database (IMDB) is a database management system that stores the entire database in _______. a. random access memory b. read-only memory c. distributed servers d. virtual memoryarrow_forwardFor each table, identify the primary key and the foreign key(s). If a table does not have a foreign key, write None. FIGURE P3.17 THE CH03_TRANSCO DATABASE TABLESarrow_forwardWhat is a relation?arrow_forward
- A(n) _____ is a request for specific information from a database.arrow_forwardModify the CHARTER table to add the attributes shown in the following table. TABLE P8.37 ATTRIBUTES AND VALUES FOR PROBLEM 37 ATTRIBUTE NAME ATTRIBUTE DESCRIPTION ATTRIBUTE TYPE CHAR_WAIT_CHG Waiting charge for each model (copied from the MODEL table) Numeric CHAR_FLT_CHG_HR Flight charge per mile for each model (copied from the MODEL table using the MOD_CHG_MILE attribute) Numeric CHAR_FLT_CHG Flight charge (calculated by CHAR_HOURS_FLOWN CHAR_FLT_CHG_HR) Numeric CHAR_TAX_CHG CHAR_FLT_CHG tax rate (8%) Numeric CHAR_TOT_CHG CHAR_FLT_CHG + CHAR_TAX_CHG Numeric CHAR_PYMT Amount paid by customer Numeric CHAR_BALANCE Balance remaining after payment Numericarrow_forwardThe database should contain the following six tables: Artists (artist_id: char(30), artist_name: char(30), artist_pop: int(5))Tracks (track_id: char(30), track_name: char(30), duration: int(10), tempo:real) Record (artist_id: char(30), track_id: char(30))Users (user_id: char(30), user_name: char(30), age: int(5), nationality: char(30), num_track_listened: int(10))Listen (user_id: char(30), track_id: char(30))Follow (user_id: char(30), artist_id: char(30), follow_date: datetime) Write a single SQL query for each request below. Find the ids of those users who have listened to at least one track but have not followed any artists. Find the ids and names of those users who have listened to some tracks recorded by the artist named 'Adele'. Find the ids and names of those users who have not listened to any track recorded by the artist named 'Adele'. Use ''NOT EXISTS'' to answer this query.arrow_forward
- Subject = database system Please help with the problem in the picture belowarrow_forwardSubject: DatabaseQuestion: Draw an ERD based on the given infoarrow_forwardas a database you need to ensure that each excercise log has a unique ID number, date, excercise category, excercise subcategory, time spent, calories burnt . each customer has unique cust_number and their first name, last name, address, program number, program tile and payment must be recorder. every program has a program number(PNum) that uniquely identifies the program. the program title, startDate, FinishDate, price must also be recorder. each coach has unique Id number. their first name, last name, date of birth, address, contactNo, username and password must be recorder. A coach can work on only one program. A program can have one or more coaches associate with it. one customer can enroll for one program at a time. normalize the above database in 3NF. State for every step in normalization which functional dependency cause it. identify different type of anomalies which can be found in a database. how can we overcome them ?arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- A Guide to SQLComputer ScienceISBN:9781111527273Author:Philip J. PrattPublisher:Course Technology PtrDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781305627482Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningDatabase 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 Learning
- Principles of Information Systems (MindTap Course...Computer ScienceISBN:9781305971776Author:Ralph Stair, George ReynoldsPublisher:Cengage LearningPrinciples of Information Systems (MindTap Course...Computer ScienceISBN:9781285867168Author:Ralph Stair, George ReynoldsPublisher:Cengage Learning
A Guide to SQL
Computer Science
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Course Technology Ptr
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781305627482
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781285196145
Author:Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:Cengage Learning
Principles of Information Systems (MindTap Course...
Computer Science
ISBN:9781305971776
Author:Ralph Stair, George Reynolds
Publisher:Cengage Learning
Principles of Information Systems (MindTap Course...
Computer Science
ISBN:9781285867168
Author:Ralph Stair, George Reynolds
Publisher:Cengage Learning