Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
Translate the logical data model in PostgreSQL.
• Development of SQL code to create the entire
• Development of the case study application for the given 10 sample queries.
• Insertion of several sample tuples for each relation in your database.
Submit your database using the pg dump command.
Derived Relations:
- Airplane(Reg_Num PK, Model_Num FK, Capacity, Weight)
- Model(Model_Num PK, Manufacturer, Type, Max_Speed)
- Technician(SSN PK, Name, Address, Phone_Number, Salary)
- Expertise(SSN PK, Model_Num PK)
- Traffic_Ctrlr(SSN PK, Date_Most_Recent)
- Union(Membership_Num PK, SSN FK)
- Test(FAA_Num PK, Name, Max_Score)
- Event(Date PK, Hours, Score, SSN FK, Reg_Num FK, FAA_Num FK)
Relationships
- Airplane is of Model (1:M)
- Technician has Expertise in Model (M:M)
- Traffic Controller undergoes Medical Examination (1:1)
- Employee belongs to Union (1:1)
- Airplane is Tested using Test (M:M)
- Testing Event records Airplane, Technician, and Test (M:M:M)
Validation of Logical Model against Corresponding User Transactions:
- Adding a new airplane to the database with its registration number, model number, capacity, and weight.
- Assigning an expertise to a technician for a particular model.
- Recording a medical examination date for a traffic controller.
- Adding a new union member with their membership number and corresponding employee SSN.
- Recording a new test with its FAA test number, name, and maximum possible score.
- Creating a new testing event with the date, hours, score, and the corresponding airplane, technician, and test involved.
Primary key constraints:
- Airplane: Reg_Num
- Model: Model_Num
- Technician: SSN
- Expertise: (SSN, Model_Num)
- Traffic_Ctrlr: SSN
- Union: Membership_Num
- Test: FAA_Num
- Event: Date
Referential integrity (foreign key) constraints:
- Airplane: Model_Num references Model(Model_Num)
- Expertise: SSN references Technician(SSN) and Model_Num references Model(Model_Num)
- Traffic_Ctrlr: SSN references Technician(SSN)
- Union: SSN references Technician(SSN)
- Event: SSN references Technician(SSN), Reg_Num references Airplane(Reg_Num), and FAA_Num references Test(FAA_Num)
Entity integrity (NULL and default value) constraints:
- Airplane: Reg_Num cannot be NULL, Model_Num cannot be NULL, Capacity cannot be NULL, Weight cannot be NULL
- Model: Model_Num cannot be NULL, Manufacturer cannot be NULL, Type cannot be NULL, Max_Speed cannot be NULL
- Technician: SSN cannot be NULL, Name cannot be NULL, Address cannot be NULL, Phone_Number cannot be NULL, Salary cannot be NULL
- Expertise: SSN cannot be NULL, Model_Num cannot be NULL
- Traffic_Ctrlr: SSN cannot be NULL, Date_Most_Recent cannot be NULL
- Union: Membership_Num cannot be NULL, SSN cannot be NULL
- Test: FAA_Num cannot be NULL, Name cannot be NULL, Max_Score cannot be NULL
- Event: Date cannot be NULL, Hours cannot be NULL, Score cannot be NULL
Alternate key constraints:
- Airplane: Registration Number
- Technician: SSN
- Union: Membership Number
Test: FAA Test Number
Sample Queries
1. Insert a new technician into the database.
2. Delete an existing airplane from the database.
3. Update the expertise of an existing technician.
4. List the details of the technician whose salary is greater than the average of the salary of all
technicians.
5. List all the model numbers that a given technician has the expertise, along with their capacity
and weight information.
6. List the total number of technicians who are experts in each model.
7. List the details (test number, test name, maximum score, etc.) of the FAA tests for a given
airplane, sorted by the maximum scores.
8. List the most recent annual medical examination and his/her union membership number for
each traffic controller.
9. List the total number of tests done by each technician for a given airplane.
10. List the name of the technician, the registration number of the airplane, and the FAA
number of those tests done between September 2021 and December 2021, sorted by the FAA
numbers.
1. Insert a new technician into the database.
2. Delete an existing airplane from the database.
3. Update the expertise of an existing technician.
4. List the details of the technician whose salary is greater than the average of the salary of all
technicians.
5. List all the model numbers that a given technician has the expertise, along with their capacity
and weight information.
6. List the total number of technicians who are experts in each model.
7. List the details (test number, test name, maximum score, etc.) of the FAA tests for a given
airplane, sorted by the maximum scores.
8. List the most recent annual medical examination and his/her union membership number for
each traffic controller.
9. List the total number of tests done by each technician for a given airplane.
10. List the name of the technician, the registration number of the airplane, and the FAA
number of those tests done between September 2021 and December 2021, sorted by the FAA
numbers.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 3 steps
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Consider the following relational database schema. The primary keys are underlined. The foreign keys are self-explanatory. TASK (Task id, Task_name, Task_type, Location, Supervisor) ASSIGNED TO (Task id, Worker_id, A_date) WORKER (Worker id, Name, Address, Daily_wage, Skill)arrow_forwardExplore the concept of Boyce-Codd Normal Form (BCNF) and when it is applicable in database normalization.arrow_forward1.Indicate the changes (using the shorthand representation) that you would need to make to the original KimTay Pet Supplies database design (see Figure 2-1) to support the following requirements. A customer is not necessarily represented by a single sales rep, but they can be represented by several sales reps. When a customer places an order, the sales rep who gets the commission on the invoice must be in the collection of sales reps who represent the customer. 2. Indicate the changes (using the shorthand representation) that you would need to make to the original KimTay Pet Supplies database design to support the following requirements.arrow_forward
- Discuss the benefits of Second Normal Form (2NF) and Third Normal Form (3NF) in database design.arrow_forwardA relational database could be able to cut down on the amount of columns in a table that are required to satisfy certain criteria by using an operation known as select.Which is it: the proper or the erroneous interpretation?arrow_forwardNormalize Table 1 to a set of Third Normal Form (3NF) relations. Your answer should show all the three stages of normalization (1NF, 2NF and 3NF) by using the Database Design Language format (underline all primary keys, composite keys and use an * to indicate the foreign keys). State the action taken upon the table(s) for each Normal Form. For the INF in this case, only identify the Primary Key and keep the INF result in a single table. Then, split into new table(s) starting from a) 2NF onwards. Also, consider the following assumptions: - One ReservelD can have multiple venues' booking. - One venue can only be booked once for the same ReservelD on the same ReserveDate ReservelD ReserveDate StartTime EndTime VenuelD VenueTag 10:00 13:00 210101-01 3-Jan-21 210101-02 3-Jan-21 Hibiscus Lily VenueSize FeePerHour Purpose |150 15:00 v10 Small Discussion 20:00 20:00 21:00 V22 Medium 260 Forum 210101-02 3-Jan-21 13:00 V20 Petal Medium 260 Meeting 210101-02 3-Jan-21 17:00 V10 Hibiscus Small 150…arrow_forward
- How can data normalization be used to check the results of the E-R diagram-to-relational database conversion process?arrow_forwardExplain why the join operation in relational algebra can be an enormous drain on the database performance.arrow_forwardHow do surrogate keys support data warehousing design?arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education