Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLEASE HELP ITS VERY URGENT, FACING MANY DIFFICLITES STUCK IN IT, KINDLY SOLVE IT!! Populate the database tables with at least 15 records for each

image text in transcribed

PLEASE HELP ITS VERY URGENT, FACING MANY DIFFICLITES STUCK IN IT, KINDLY SOLVE IT!!

  1. Populate the database tables with at least 15 records for each entity. If 15 rows are not possible in bridge tables then you may skip. [2]
  2. Formulate queries for the given questions and attach their retrieved results. [7]

  1. List Customers name, car serial number with associated Mechanic names.
  2. List Customers name, total amount which customer spent in parts.
  3. List Sales person name with service name.
  4. List invoice numbers of a particular customer with all services and charges.
  5. List mechanic names with total number of jobs don
  6. Create a trigger for maintaining operations log in another backup-table for insert, update, and delete in the customer table.
  7. Create a Store procedure which allow insertion in all the attributes of part used and ensure the Part used price is never inserted 0.
Car PK Car ID Serial Number Make Model Colour Year Car for Sale Y/N Sales Invoice Salesperson PK Invoice_ID Customer PK Salesperson_ID PK Customer ID Last Name First Name Invoice Number Date FK1 Car ID (Foreign) FK2 Customer ID (Foreign) FK3 Salesperson ID (Foreign) Last Name First Name Phone Number Address City State/Province Country Postal Code Service Ticket Mechanic PK Service_Ticket_ID PK Mechanic_ID Last Name First Name Service Ticket Number FK1 Car ID (Foreign) FK2 Customer ID (Foreign) Date Received Comments Date Returned to Customer Service PK Service ID Service Name Hourly Rate Service Mechanic PK Service Mechanic ID Parts Used Parts FK2 Service Ticket ID (Foreign) FK3 Service ID (Foreign) FK1 Mechanic ID (Foreign) Hours Comment Rate PK Parts Used_ID PK Parts_ID FK1 Part ID (Foreign) FK2 Service Ticket ID (Foreign) Number Used Price Part Number Description Purchase Price Retail Price Car PK Car ID Serial Number Make Model Colour Year Car for Sale Y/N Sales Invoice Salesperson PK Invoice_ID Customer PK Salesperson_ID PK Customer ID Last Name First Name Invoice Number Date FK1 Car ID (Foreign) FK2 Customer ID (Foreign) FK3 Salesperson ID (Foreign) Last Name First Name Phone Number Address City State/Province Country Postal Code Service Ticket Mechanic PK Service_Ticket_ID PK Mechanic_ID Last Name First Name Service Ticket Number FK1 Car ID (Foreign) FK2 Customer ID (Foreign) Date Received Comments Date Returned to Customer Service PK Service ID Service Name Hourly Rate Service Mechanic PK Service Mechanic ID Parts Used Parts FK2 Service Ticket ID (Foreign) FK3 Service ID (Foreign) FK1 Mechanic ID (Foreign) Hours Comment Rate PK Parts Used_ID PK Parts_ID FK1 Part ID (Foreign) FK2 Service Ticket ID (Foreign) Number Used Price Part Number Description Purchase Price Retail Price

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

What does the centrifuge do? How does it need to be loaded?

Answered: 1 week ago

Question

Evaluate three pros and three cons of e-prescribing

Answered: 1 week ago