Question

Assume that Garden Glory designs a database with the following tables: OWNER (OwnerID, OwnerName, OwnerEmailAddress, OwnerType)...

Assume that Garden Glory designs a database with the following tables: OWNER (OwnerID, OwnerName, OwnerEmailAddress, OwnerType) OWNED_PROPERTY (PropertyID, PropertyName, PropertyType, Street, City, State, Zip, OwnerID) GG_SERVICE (ServiceID, ServiceDescription, CostPerHour); EMPLOYEE (EmployeeID, LastName, FirstName, CellPhone, ExperienceLevel) PROPERTY_SERVICE (PropertyServiceID, PropertyID, ServiceID, ServiceDate, EmployeeID, HoursWorked) The referential integrity constraints are: OwnerID in OWNED_PROPERTY must exist in OwnerID in OWNER PropertyID in PROPERTY_SERVICE must exist in PropertyID in OWNED_ PROPERTY ServiceID in PROPERTY_SERVICE must exist in ServiceID in GG_SERVICE EmployeeID in PROPERTY_SERVICE must exist in EmployeeID in EMPLOYEE Assume that OwnerID in OWNER, PropertyID in PROPERTY, ServiceID in GG_SERVICE, EmployeeID in EMPLOYEE, and PropertyServiceID in PROPERTY_SERVICE are surrogate keys with values as follows: OwnerID Start at 1 Increment by 1 PropertyID Start at 1 Increment by 1 ServiceID Start at 1 Increment by 1 EmployeeID Start at 1 Increment by 1 PropertyServiceID Start at 1 Increment by 1

How to create the table

0 0
Add a comment Improve this question Transcribed image text
Answer #1

create table OWNER (OwnerID int Primary Key Auto_increment, OwnerName varchar(20), OwnerEmailAddress varchar(50), OwnerType varchar(4));

create table OWNED_PROPERTY (PropertyID int Primary Key Auto_increment, PropertyName varchar(20), PropertyType varchar(4), Street varchar(50), City varchar(20), State varchar(30), Zip int, OwnerID int references OWNER(OwnerId));

create table GG_SERVICE (ServiceID int Primary Key Auto_increment, ServiceDescription varchar(100), CostPerHour int);

create table EMPLOYEE (EmployeeID int Primary Key Auto_increment , LastName varchar(20), FirstName varchar(20), CellPhone int(10), ExperienceLevel varchar(30));

create table PROPERTY_SERVICE (PropertyServiceID int Auto_increment, PropertyID int references OWNED_PROPERTY(PropertyID), ServiceID references GG_SERVICE(ServiceID), ServiceDate Date, EmployeeID int references EMPLOYEE(EmployeeID), HoursWorked int);

Add a comment
Know the answer?
Add Answer to:
Assume that Garden Glory designs a database with the following tables: OWNER (OwnerID, OwnerName, OwnerEmailAddress, OwnerType)...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Please write in Mysql OWNER ( OwnerID, OwnerName, OwnerEmail, OwnerType ) PROPERTY ( PropertyID, PropertyName, Street,...

    Please write in Mysql OWNER ( OwnerID, OwnerName, OwnerEmail, OwnerType ) PROPERTY ( PropertyID, PropertyName, Street, City, State, Zip, OwnerID ) EMPLOYEE ( EmployeeID, LastName, FirstName, CellPhone, ExperienceLevel ) SERVICE ( PropertyID, EmployeeID, ServiceDate, HoursWorked ) Write an SQL statement to list LastName and FirstName of employees who have worked on a property in Bellevue. Use a subquery. The result should look like the following: LastName FirstName Murray Dale Fontaine Joan Evanston John

  • Garden Glory Project Questions The following Garden Glory database design is used in Chapter 3: OWNER...

    Garden Glory Project Questions The following Garden Glory database design is used in Chapter 3: OWNER (OwnerID, OwnerName, OwnerEmail, OwnerType) PROPERTY (PropertyID, PropertyName, Street, City, State, Zip, OwnerID) EMPLOYEE (EmployeeID, LastName, FirstName, CellPhone, ExperienceLevel) SERVICE (PropertyID, EmployeeID, SeviceDate, HoursWorked) The referential integrity constraints are: OwnerID in PROPERTY must exist in OwnerID in OWNER PropertyID in SERVICE must exist in PropertyID in PROPERTY EmployeeID in SERVICE must exist in EmployeeID in EMPLOYEE Garden Glory has modified the EMPLOYEE table by adding...

  • need help with part b GARDEN GLORY PROJECT QUESTIONS Garden Glory wants to expand its database applications beyond the...

    need help with part b GARDEN GLORY PROJECT QUESTIONS Garden Glory wants to expand its database applications beyond the recording of property services. The company still wants to maintain data on owners, properties, employees, and services, but it wants to include other data as well. Specifically, Garden Glory wants to track equipment, how it is used during services, and equipment repairs. In addition, employees need to be trained before they use certain equipment, and management wants to be able to...

  • Hi. Can someone please help me with this SQL question? I asked this before, but someone...

    Hi. Can someone please help me with this SQL question? I asked this before, but someone just cut and pasted a completely incorrect answer that they found online. Please be genuine in your response. Write an SQL statement to show the sum of HoursWorked for each type of OWNER but exclude services of employees who have ExperienceLevel of Junior. OWNER ( OwnerID, OwnerName, OwnerEmail, OwnerType ) PROPERTY_TYPE ( PropertyID, PropertyName, PropertyType, Street, City, State, Zip,OwnerID ) PROPERTY_SERVICE (PropertyServiceID, PropertyID, ServiceID,...

  • For this set of Review Questions, we will create and use a database for the Wedgewood...

    For this set of Review Questions, we will create and use a database for the Wedgewood Pacific Corporation (WPC) that is similar to the Microsoft Access database we created and used in Chapters 1 and 2. Founded in 1957 in Seattle, Washington, WPC has grown into an internationally recognized organization. The company is located in two buildings. One building houses the Administration, Accounting, Finance, and Human Resources departments, and the second houses the Production, Marketing, and Information Systems departments. The...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT