Your task this week is to write the SQL statements to create the tables from your relational
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 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)
Data Modeling and Database Design
ISBN: 978-1285085258
2nd edition
Authors: Narayan S. Umanath, Richard W. Scammel