Question: Write the SQL statements to create and populate the following database. Create the tables and relationships needed to store the data shown here. Don't create
Write the SQL statements to create and populate the following database.
Create the tables and relationships needed to store the data shown here. Don't create just one table! Develop rules based on the data shown, as well as:
Projects cannot start before 1/1/2010;
Hours worked cannot exceed 24 and must be more than zero;
Work date must be after 1/1/2010 and before 12/31/2019;
Any entries in a table on the many side of a relationship must have a related record in the table on the one side.
Insert data into the appropriate tables.
| First Name | Last Name | Project Name | Project Starts | Work Date | Work Date |
| Obadiah | Stane | Mayhem | 5/1/17 | 5/1/17 | 16 |
| Ivan | Vanko | Mayhem | 5/1/17 | 5/1/17 | 20 |
| Tony | Stark | Justice | 1/1/2010 | 4/1/14 | 8 |
| Tony | Stark | Justice | 1/1/2010 | 10/2/17 | 8 |
| Obadiah | Stane | Anarchy | 2/1/2014 | 8/25/16 | 4.5 |
| Obadiah | Stane | Mayhem | 5/1/17 | 5/20/17 | 12 |
| Ivan | Vanko | Mayhem | 5/1/17 | 9/2/17 | 10.75 |
| Tony | Stark | Truth | 12/31/2012 | 7/3/12 | 5 |
| Yinsen | |||||
| Peace | 1/1/2018 |
Could anyone help me to write code for this SQL statement? I use the SQL server to write this statement. Thank you.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
