Docsity

Hotel Management System: Database Design with ER Diagram and Data Dictionary, Thesis of Information Systems

Partial preview of the text

Download Hotel Management System: Database Design with ER Diagram and Data Dictionary and more Thesis Information Systems in PDF only on Docsity!

3.0 Tasks:

1. Normalization:

It is an operation to collocate data in a database. This may incorporate

the use of tables, and inaugurate relationships between these tables in

report to the rules depicted to secure data and to create a pliable

database by getting rid of redundancy.

st

Normal Form:

 Terminate replicating groups in specific tables.

 Fabricate separate tables for each set of data.

 Use primary key to associate each set of data.

nd

Normal Form:

 Construct unconnected tables for utilities that may apply to

numerous records.

 Amalgamate these tables using foreign keys.

rd

Normal Form:

 Eradicate such field that does not depend on the key.

A data dictionary suppresses metadata, which is data of the database. It

is integral to have data dictionary as it carries information regarding the

contents of the database, bodies that are authorized to access, and the

veracious location of the existing somatic database. It is usually handled

by the administrators themselves as the user has no duties regarding

data dictionaries. Below are the data dictionaries of the hotel bookings.

Customer:

Customer Table

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

Hotel Manager:

Manager Table

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

Index:

Key Name Type Unique Column Null Primary Key B TREE Yes Manager ID No

Hotel Room:

Room Table

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:

Database software was introduced to accomplish the tasks that were

listed. The choice of software was MySQL as the commands and

statements are unambiguously adoptable considering the system itself to

be complex as it requires a handful amount of attention within the

manufacturing process as well as the design task. Below are some

screenshots of the tables and database that was created with this

implementation.

Creating Customer Table:

Figure 2 Statement used to create customer table.

Figure 3 Customer table created with all required columns.

As it can be drawn out of Figure 6, the statement is used in such a way

that it also distinguishes the primary key on Customer_ID on the other-

hand the same structured statement is utilized to create other tables in

this database.

Adding Data in Customer Table:

Figure 4 Adding data of a customer into its respected table.

Bookings 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:

Some handful of other queries was implemented in order for the

database to not only is tested but to be fully functional for its users to

interpret with. Below are the types of queries that were executed during

the operation.

Creating Local host User:

Figure 9 successfully created a user and set up its password.

Granting Privileges to new User:

Figure 10 granted access of the database to the user “manager”.

Equi Join:

Figure 11 Successfully Equi Join was implemented after server connection loss.

Inner Join:

Figure 12 Inner Join was applied using this statement.

4.0 Discussion:

All the essential duties were accomplished together with the

implementation of extra queries which will produce preferable

practicality in its own way considering the tasks of hotel workforce as

well as the customers while booking a room.

Numerous complications occurred in between tasks but they were all

deciphered in no time. Meanwhile some queries such as “Applying

Foreign Key” may keep an individual scratching his head but after a

thorough research over the internet and referring back to former

lectures, final overwhelming problems over queries were decoded.

An ample amount of time was awarded to complete the assignment. It

was undoubtedly lengthy therefore it required work hours incessantly to

perfectly complete each task. Spending time over this assignment has

surely brought into senses that SQL is quiet intriguing and it will be a

main aim to pursue further knowledge over it for further professionalism

of career in the near future.

5.0 Conclusion:

A hotel required its system to run online thus they were looking for a

database system that will ease their workload. Some noticeable tasks

were assigned according to the briefing for a perfect database to exist. It

not only required being user friendly but also for the hotel management

to interact with it effortlessly. The milestones were prosperously

achieved all the chores that were mentioned, although it consumed

energy colossally but hard work and consistency promised to fulfill the

demands after some refreshments.

6.0 References:

Microsoft, Database Normalization Basics and its Description; (Accessed

on 05/04/2022)

https://docs.microsoft.com/en-us/office/troubleshoot/access/database-

normalization-description

Tutorials Point, What is Data Dictionary? ; (Accessed on 06/04/2022)

https://www.tutorialspoint.com/What-is-Data-Dictionary

Visual Paradigm, What is ERD? ; (Accessed on 05/04/2022)

https://www.visual-paradigm.com/guide/data-modeling/what-is-entity-

relationship-diagram/

W3 Schools, SQL MySQL; (Accessed on 06/04/2022)

https://www.w3schools.com/mysql/mysql_sql.asp