Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please write in MySQL PROPERTY ( PropertyID, PropertyName, Street, City, State,

ID: 3678555 • Letter: P

Question

Please write in MySQL

PROPERTY ( PropertyID, PropertyName, Street, City, State, Zip, OwnerID )
EMPLOYEE ( EmployeeID, LastName, FirstName, CellPhone, ExperienceLevel )
SERVICE ( PropertyID, EmployeeID, ServiceDate, HoursWorked )

Write SQL statements to insert at least three rows of data into the SERVICE table. Assume that any surrogate key value will be supplied by the DBMS. Remember the referential integrity constraints:
PropertyID in SERVICE must exist in PropertyID in PROPERTY
EmployeeID in SERVICE must exist in EmployeeID in EMPLOYEE.

The data in the PROPERTY and EMPLOYEE tables is shown below:

Enter your answer below

PropertyID PropertyName Street City State Zip OwnerID 1 Eastlake Building 123 Eastlake Seattle WA 98119 2 2 Elm St Apts 4 East Elm Lynwood WA 98223 1 3 Jefferson Hill 42 West 7th St Bellevue WA 98007 2 4 Lake View Apts 1265 32nd Avenue Redmond WA 98052 3 5 Kodak Hieghts Apts 65 32nd Avenue Rochester NY 14604 4 6 Private Residence 1456 48th St Bellevue WA 98007 1 7 Private Residence 1567 51st St Bellevue WA 98007 3 8 Private Residence 567 151st St Rochester NY 14604 5

Explanation / Answer

As employee table is not given. Hence, i am taking some random names to be inserted in the service table

INSERT INTO SERVICE (PropertyID, EmployeeID, ServiceDate, HoursWorked)
VALUES (1,100,'1/dec/2015',1),
(2,101,'1/jan/2001',10),
(3,102,'1/july/2002',15);
Here, i am assuming that there are three employee exists which employee id 100,101 and 102. I also assumed that the data type of data is string.

If you have any doubt then please comment below...