Question: Your task this week is to write the SQL statements to create the tables from your relational schema. You will also write the SQL statements

Your task this week is to write the SQL statements to create the tables from your relational schema. You will also write the SQL statements to insert a minimum of 5 rows of data into each table. Include all of SQL statements in a single SQL script file. The script should execute as a single script. . You will be graded on the following:

  • Script file is formatted in a way that all SQL statements are clear.
  • You included comments in your script file.
  • You have properly added primary and foreign key constraints.
  • Good use of naming conventions (table names and column names)
  • The script executes with no errors.

Relational Schema:

CUSTOMER (CUSTOMER ID, CUST_FNAME, CUST_LNAME, CUST_ADDRESS, CUST_DOB, CUST_EMAIL)

PAYMENT (PAYMENT_ID, PAYMENT_TYPE, PAYMENT_DATE, PAYMENT_AMOUNT, CUSTOMER_ID - fk, CREDIT_CARD_NUM -fk )

PAYMENT INFO (CREDIT_CARD_NUM, EXPIRATION_DATE)

EMPLOYEE (EMPLOYEE_ID, EMP_FNAME, EMP_LNAME, EMP_ADDRESS, EMP_DEPT, EMP_POSITION, EMP_USERNAME, EMP_PASSWORD)

ROOM_SELECTION (RESERVATION_ID - fk, ROOM_NUM-fk)

ROOM (ROOM_NUM, ROOM_TYPE, ROOM_DESCRIPTION)

SERVICE (SERVICE_ID, SERV_TYPE, SERV_COST)

RESERVATION (RESERVATION_ID, CUSTOMER_ID -fk , EMPLOYEE_ID - fk, PAYMENT_ID - fk, RESERVATION_DATE, CHECK_IN_DATE, CHECK_OUT_DATE)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!