Normalization and writing sql statements

Assignment Help Database Management System
Reference no: EM13854276

Aim: To give you practical experience in with database modelling, normalization and writing SQL statements.

Background Information

A local Sydney hotel requires a database system to manage their bookings and payments.

When a guest rings up or comes into the hotel to book a room for the first time they are asked to provide their name, address, and telephone number. Guests may make reservations for a room which includes the date and time, number of adults, number of children, expected arrival date & time, expected departure date & time, and notes. Reservations may be confirmed and / or cancelled.

When the guest checks in to the hotel reception enter a record of the room number, and check in date & time. Guests may also check in without a reservation.

When the guest checks out then the checkout date & time, and number of days are entered into the database. The number of days is calculated but may be overwritten by a manager and the guest is charged for the accommodation plus additional service charges including restaurant, dry cleaning, valet parking, room service, etc.

Once the checkout details have been completed then the guest is invoiced for the accommodation and also additional service charges. Payments are recorded for each room booking. Payments are expected to be in full. However, the system allows multiple payments to be recorded against each room booking.

The database system also needs to keep a record of database users, staff, rooms, room type, facilities, payments, payment types, and guest notes.

Project Specification

1. Part A

You are provided an Excel file that contains a partial ERD, suggested table definition, and also some sample data. See HMS_Data.xlsx

Use the Excel workbook file HMS_Data.xlsx to perform the following tasks.

1. Your first task is to study the sample data and determine appropriate data definitions. Check that the spreadsheet data has been normalized to third normal form. Study the partial ERD on the first sheet that provides a suggested schema.

The file has various other worksheets including:

• Bookings
• Country Lookup
• Facility List
• Guests
• Notes
• Payment Methods
• Payments
• Reservations
• Room Facilities
• Rooms
• Room Type
• Service Charge
• Service Types
• Staff
• Users

2. Create an Entity Relationship Diagram (ERD) to help you decide on the relationships.

Your entity relation diagram that models your database design should:

a. Include all entities, relationships (including names) and attributes.

b. Identify primary and foreign keys.

c. Include cardinality/ multiplicity and show using crow's feet or UML notation.

d. Include participation (optional / mandatory) symbols if applicable.

The E-R should be created as part of a Microsoft Word document. Hand-drawn diagrams will not be accepted. It is recommended that
you complete your ERD using Visio, draw.io, or www.gliffy.com.

3. Using SQLite, you are required to develop a demonstration prototype system that handles hotel bookings and payments. Use SQLite to create a new database called HMS. Create tables according to your ERD. Follow a standard naming convention for table names and also field names. Avoid using spaces and any special characters in table and also field names. Use underscore_case or use camelCase to separate parts of a name.

4. Create relationships between tables and enforce the referential integrity as shown below.

Relationships:

• Guests can have one or more bookings.

• Each room booking can have numerous service charges associated with it.

• Each room is classified by room type, such as deluxe, suite, or twinshare.

• Each room is also provisioned with various facilities such as TV, spa, etc.

• Each guest record may require one or more notes so as to keep a history of information related to the guest record.

• Notes may be assigned to a particular staff person (or database user) to follow up.

• Each room booking may have one or many payments and each payment is identified as to the payment method.

5. The database should include suitable validation and integrity checks as well as appropriate referential integrity checks. That is, AS A

MINIMUM, your system should ensure that the following events cannot occur:

Referential Integrity Constraints:

• A booking record cannot be entered for a guest that does not exist.

• A guest cannot be deleted for which a reservation or a booking has been recorded. Similarly a guest cannot be deleted once notes have been entered for the guest record. Likewise, staff (users) cannot be deleted once staff persons have been assigned to follow up a note.

• A booking cannot be deleted once the booking has a service charge or payment details associated with it. Similarly a service type cannot be deleted once the service type has been entered against any service charge detail record for a guest booking.

• Only service types that have been entered into the service types table may be entered as charges for service charge details.

• Rooms cannot be deleted once rooms have been assigned to a guest room booking record.

• Payment methods cannot be deleted once payment methods have been recorded against payments and room bookings that have matching payment details cannot be deleted once payment records have been entered.

6. Save the data in the Excel file provided in a CSV file format and import the data into your tables in SQLite.

a. Save a copy of HMS_Data.xlsx as HMS_ERD.xlsx and for each sheet delete the definition and arrange the data so that the sample data appears immediately below the column headings.

Position the data for each table starting from cell A1.

b. Import your normalised data from Excel into your tables. Save your data in Excel in a CSV file format. Select your table in SQLite, click the Operations tab and then import the data from the CSV file. See

https://stackoverflow.com/questions/1045910/how-can-i-import- load-a-sql-or-csv-file-into-sqlite to learn how to save in a CSV format and import into SQLite.

7. Add at least two new records into the appropriate tables to include your details as a guest, room booking details of your own, and notes details related to your guest record.

Attachment:- dbms.zip

Reference no: EM13854276

Questions Cloud

Aancestral relationships within the tribe hominini : 1. Why is Homo maledi important and what are the ancestral relationships within the Tribe Hominini? 2. What are the distinguishing characteristics of the Eukaryotes, Archaea and Bacteria?
Describe the purpose of a mac address : Describe the purpose of a MAC address, where it is used, and a specific example of a specific address itself.
What are the two primary signaling methods for networks : What are the two primary signaling methods for networks? What are the main differences and where is one used versus the other?
A water tank has six taps on the bottom : A water tank has six taps on the bottom. If all of the faucet is opened, the tank is fully charged it will run out within 8 hours. How many hours are required to spend tankage when only 4 pieces faucet is opened?
Normalization and writing sql statements : Experience in with database modelling, normalization and writing SQL statements - Create an Entity Relationship Diagram (ERD) to help you decide on the relationships.
Decide to create a location tracking service : We decide to create a "location tracking" service so that we can track our friends' GPS locations with a time granularity of 5 minutes. Each person who subscribes to the service is given a domain name, [email protected] , and there is a LT (location tra..
How to communicate across different networks : Without good knowledge of how to communicate across different networks, you may jeopardize you online reputation. List two examples of how poor social media etiquette can land you in awkward situations with your friends or employers
Compare and contrast the underlying themes in a film : Compare and contrast the underlying themes in a film required for the class by the midterm with a non-required film of your choice.
Allow a grocery store to keep track of the total number : Write a program that will allow a grocery store to keep track of the total number of bottles collected for seven days.  The program should allow the user to enter the total number of bottles returned for seven days.  The program will

Reviews

Write a Review

Database Management System Questions & Answers

  Analyze the fundamentals of pki

Analyze the fundamentals of PKI, and determine the primary ways in which its features and functions could benefit your organization and its information security department.

  Expanded entity relationship model diagram

Each department has many employees assigned to it, but each employee works for only one department at one of the factories. An employee cannot work at more than one factory at a time.

  Transaction processing to the database insert functionality

transaction processing to the database INSERT functionality from the previous week to make it operate more reliably. Changes to the database will be committed

  Analyze the data in at least three different ways

Analyze the data in at least three different ways. Each form of Data Analysis should be provided on a separate, appropriately labeled worksheet. It is expected that each sheet will be professionally formatted and clearly documented with titles, co..

  Explain the concept of physical data independence

Explain the concept of physical data independence and its importance in database systems,  List four significant differences between a file-processing system and a DBMS.

  Prepare a report - the report should be related to business

prepare a report - the report should be related to business communications.topics to cover in your written reportbull

  Describe each database being compared

You should briefly describe each database being compared. Then compare the databases based on their scalability functionality, and interoperability. Finally, make your recommendation based on yo comparison.

  Advantages of a database management to file processing

How will wireless information appliances and services affect the business use of the Internet and the Web? Explain.

  Design an er diagram to capture the given requirements

Design an ER diagram to capture the requirements. State any assumptions you have that affects your design and three-level schema architecture for the Gyan Gurukul Company that provide better security also design a data abstraction for his client ka..

  Determine the cartesian product of sets

Determine the Cartesian product (A X B) of the given pair of sets. A => Set of first letter of names of countries = A = { R, S, T } B => Set of numbers denoting Postal codes = B = { 0001, 1001}.

  Create a detailed erd using the entities and attributes

Create a detailed ERD using the Entities and Attributes for Driver's Log document found on the Huffman Trucking Intranet site. Use Microsoft® Access® to create the preliminary

  Provide the sql to amend the original table design

You have been given the following specifications of a simple database for a netball association that keeps record of players, teams and matches.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd