









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










st
nd
rd
Field Name Data Type Length Index Null Default Validation rule Description Customer ID (Primary) Integer (20) 20 PK No A unique key that recognises every customer First Name Varchar (10) 10 No Customer’s First Name Last Name Varchar (10) 10 No Customer’s Last Name E-mail Varchar (20) 20 No An E-mail format is required with @ in order for it to be full filled Customer’s E-mail Cell-No Varchar (20) 20 No Customer’s Cell Number Password Varchar (20) 20 No Password set up by customer Address Varchar (40) 40 No Customer’s Address City Varchar (10) 10 No City where customer is located Country Varchar (10) 10 No Customer’s Country Post Code Integer (10) 10 No City post code of customer’s address Payment Method Varchar (10) 10 no Choice of payment method chosen by customer. Index:
Key Name Type Unique Column Null Primary Key B TREE Yes Customer-ID No
Field Name Data Type Length Index Null Default Validation rule Description Manager ID (Primary) Integer (10) 10 PK No A unique key that recognises every Manager First Name Varchar (10) 10 No Manager’s First Name Last Name Varchar (10) 10 No Manager’s Last Name E-mail Varchar (20) 20 No Use the E-Mail format with @ Manager’s E-mail Cell-No Integer (20) 20 No Manager’s Cell Number Password Varchar (20) 20 No Set up by Manager
Key Name Type Unique Column Null Primary Key B TREE Yes Manager ID No
Field Name Data Type Length Index Null Default Validation rule Description Room ID (Primary) Integer (20) 20 PK No A unique key that recognises every Room Room Type Varchar (20) 20 No Type of room single/double Floor-No Integer (10) 10 No Floor Number where room is located Room-No Integer (10) 10 No Room No
Key Name Type Unique Column Null Primary Key B TREE Yes Room ID No Foreign Key Yes Customer ID No Foreign Key Yes Room ID No Foreign Key Yes Manager ID No
4. Database Implementation:
Figure 2 Statement used to create customer table.
Figure 3 Customer table created with all required columns.
Figure 4 Adding data of a customer into its respected table.
Figure 7 Created Bookings Table with Foreign Keys set up. Figure 8 Alter table used to apply Foreign Keys in Bookings Table.
5. Queries Design:
Figure 9 successfully created a user and set up its password.
Figure 10 granted access of the database to the user “manager”.
Figure 11 Successfully Equi Join was implemented after server connection loss.
Figure 12 Inner Join was applied using this statement.