Question: SQL Problem 1 You are to create a DB for a construction company to show which job is for which customer. Create the following tables
SQL
Problem 1
You are to create a DB for a construction company to show which job is for which customer.
- Create the following tables
TCustomers
Name
Phone
TJobs
Job description (250 characters)
Start Date
End Date (allow NULLs)
TCustomerJobs
Join the Customer and Job tables together
- Create FK table showing child, parent and column used to create relationship
- Create FKs based on step #2.
- Add at least 3 customers
- Add at least 3 jobs at least one with a NULL End Date
- Give 2 customers jobs leaving 1 with no job.
- Give 1 customer 2 different jobs.
- Try to give a customer the same job twice. This should fail. (Comment this code out prior to submitting)
- Write query to show all customers and jobs
- Write query to show any job not completed
- Write query to update an End Date from NULL to a date after the Start Date for that job.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
