Top-Rated Free Essay
Preview

Hotel Assignment

Satisfactory Essays
732 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Hotel Assignment
School of Arts & Sciences Department of Computers & Technology
COMP 420 – Database Systems Assignment 3

Holiday Hotel has a database system that records data on the hotel rooms, and the guests that use the rooms. A portion of the database schema is given below. Guest personal data are recorded in the Guest table. The room is registered in the name of one guest, even if there are multiple persons sharing the room. Rooms are of various types (double bed, suite, etc.). The cost of the room is dependent on the roomtype. The room cost is calculated as the cost per night times the number of nights (CheckOutDate – CheckInDate). When a new registration is added, the CheckOutDate is left Null and on check out, the CheckOutDate is updated.

GUEST (GuestId, GuestName, Address, Phone)

ROOM (RoomId, RoomTypeId, AvailableStatus)

ROOMTYPE (RoomTypeId, RoomType, CostPerNight)

REGISTRATION (RegId, RoomId, GuestId, CheckInDate, CheckOutDate)

1. For this assignment, draw a detailed ER diagram using UML notation. Write all attributes in the ERD using the format -> attribute: type. Make reasonable assumptions about data types. For the Registration table, explain all constraints that are necessary on the table. [25 marks]

2. Guest 1234 registers and checks in Room R25 on 14-Jan-09 (RegId = 9005).

Carefully explain the referential integrity checks that the DBMS would perform when the insert statement is executed. Explain the entity integrity check and the uniqueness check on the primary key that the DBMS would perform before this insert statement is executed successfully. Be very specific with your answers; explain exactly what tables/columns would be checked and what would happen if the check is successful/unsuccessful. [15 marks]

3. Define the following related concepts. Use an example(s) to convey your message and include a diagram. a. Parent/child entities b. Identifying & non identifying relationships c. Weak / strong entities These do not have to be explained in any order. Only ensure that they are all included in your description. Marks will be given for clarity and organization for this question. [18 marks] 4. Explain the concept of a view in database systems. Give one advantage of using views in database applications. [6 marks]

5. Differentiate between a candidate key and the primary key for a given relation? Also include the explanation of the concept of foreign keys although it would be expected that it would have been discussed in previous questions. [6 marks]

6. Consider the instance of the Students relation shown in the table above.

SID | NAME | LOGIN | AGE | GPA | 50000 | Dave | dave@cs | 19 | 3.3 | 53666 | Jones | jones@cs | 18 | 3.4 | 53688 | Smith | smith@ee | 18 | 3.2 | 53650 | Smith | smith@math | 19 | 3.8 | 53831 | Madayan | madayan@music | 11 | 1.8 | 53832 | Guldu | guldu@music | 12 | 2.0 |
(© Ramakrishnan & Gehrke, 2002) 7. a. Give an example of an attribute (or set of attributes) that you can deduce is not a candidate key, based on this instance being legal? Thoroughly explain your logic for full marks. b. Is there any example of an attribute (or set of attributes) that you can deduce is a candidate key, based on this instance being legal? Thoroughly explain your logic for full marks.

[10 marks]

8. Question 8, 9, & 10 are based on the following table Emp_SSN | Emp_Name | Emp_Rank | Hire_Date | Dept_Code | Dept_Name | Emp_Office | Adv_ID | Adv_Name | Adv_DOB | 078-05-1120 | Thompson Cummings | Professor | 7/1/1990 | CT | Comp. and Tech. | D-1 | 3567 | Ron | 2/23/1985 | 078-05-1120 | Thompson Cummings | Professor | 7/1/1990 | CT | Comp. and Tech. | D-2 | 1480 | Kern | 1/01/1970 | 101-99-2468 | Michael Roberts | Asst. Professor | 8/21/2005 | AH | Arts and Humanities | G-12 | 2811 | Nick | 11/30/1983 | 123-45-6789 | Aleksandr Myllari | Assoc. Professor | 1/13/2012 | BUS | Business | B-4 | 7140 | Shamaul | 12/12/1982 | 123-45-6789 | Aleksandr Myllari | Assoc. Professor | 1/13/2012 | BUS | Business | B-5 | 3334 | Antonio | 1/06/1988 | 789-34-5432 | Keston Bhola | Asst. Professor | 7/1/2010 | CT | Comp. and Tech. | D-2 | 4567 | Karla | 2/28/1987 |

9. Given the following table choose an appropriate primary key. Explain the reasoning behind you choice. [4 marks]

10. Explain all functional dependencies that exist. [15 marks]

11. Normalize the above up to the third normal form (3NF). Explain each the logic for each normal form in the context of the above table. [15 marks]

You May Also Find These Documents Helpful

  • Good Essays

    An entity relationship diagram (ERD) is a graphical documentation technique used in the designing of database within organizations to describe the entities and their direct relationships (Bagranoff, Simkin, & Strand, 2008). The ERD diagram consists of entities, attributes, and relationship. The entity represents a rectangular; the diamond is symbolized by describing the relationship of the entities, oval shape describes the attributes, and the lines connect all three to describe their relationship. Attached is an ERD of Kudler Fine Foods showing their existing data tables.…

    • 496 Words
    • 2 Pages
    Good Essays
  • Satisfactory Essays

    INDEX 1 WORK BREAKDOWN STRUCTURE -------------------------------------- 3 2 WORKBREAKDOWN STRUCTURE OUTLINE --------------------------- 4 3 NETWORK DEVELOPMENT DIAGRAM -------------------------------------- 6 4 GANTT CHART ---------------------------------------------------------------------- 7 5 FORMAL REPORT -----------------------------------------------------------…

    • 311 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    3. (2 pts) Draw the ERD for the following scenario. Include all the attributes. Note that one of your tables will have a composite identifier.…

    • 298 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    You should be able to explain each of the concepts below as well as provide concrete examples to fit each one.…

    • 408 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    StudyModeUpload

    • 2671 Words
    • 24 Pages

    65. Write the SQL code to create the table structures for the entities shown in Figure P7.65. The structures should contain the attributes specified in the ERD. Use data types that would be appropriate for the data that will need to be stored in each attribute. Enforce primary key and foreign key constraints as indicated by the ERD.…

    • 2671 Words
    • 24 Pages
    Powerful Essays
  • Satisfactory Essays

    DBM 380 Syllabus

    • 623 Words
    • 4 Pages

    This course covers database concepts. Topics include data analysis, the principal data models with emphasis on the relational model, entity-relationship diagrams, database design, normalization, and database administration.…

    • 623 Words
    • 4 Pages
    Satisfactory Essays
  • Better Essays

    In the following paragraphs LTA will discuss the database architecture briefly and primary keys, which play a vital role in an Entity-Relational Database. The discussions of the different types of mistakes that are made in the design phase that led to a poor database design are also discussed. Mistakes include the lack of careful planning, proper normalization of data, poor naming conventions, lack of sufficient documentation and extensive testing. The ERD for the database will be revealed along with the choice of the program to manage the database and allow for versatility for various platforms, applications, and features.…

    • 2033 Words
    • 9 Pages
    Better Essays
  • Satisfactory Essays

    Cis 276

    • 374 Words
    • 2 Pages

    7.What is an ER diagram? An entity-relationship (E-R) diagram represents a database visually by using a rectangle for each entity that includes the entity’s name above the rectangle and the entity’s columns inside the rectangle, using a line to connect two entities that have a relationship, and placing a dot at the end of a line to indicate the “many” part…

    • 374 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    2. Then convert E-R diagram to SQL DDL, or whatever database model you are using…

    • 1653 Words
    • 7 Pages
    Powerful Essays
  • Satisfactory Essays

    Dbm380 Course Syllabus

    • 2296 Words
    • 10 Pages

    Course Description This course covers database concepts. Topics include data analysis, the principal data models with emphasis on the relational model, entity-relationship diagrams, database design, normalization, and database administration. Policies Faculty and students will be held responsible for understanding and adhering to all policies contained within the following two documents: • • University policies: You must be logged into the student website to view this document. Instructor policies: This document is posted in the Course Materials forum.…

    • 2296 Words
    • 10 Pages
    Satisfactory Essays
  • Powerful Essays

    Good Hotel (Case 25)

    • 1658 Words
    • 7 Pages

    What is the stand out economic characteristics of the macro environment of the US hotel lodging industry?…

    • 1658 Words
    • 7 Pages
    Powerful Essays
  • Good Essays

    Hotel Model

    • 544 Words
    • 3 Pages

    The hotel model is where support staff do things for the people they look after and then become observers by not doing things for themselves.Active support is a way of ensuring people are able to engage and take part in their own support by having a person centred plan for them.…

    • 544 Words
    • 3 Pages
    Good Essays
  • Powerful Essays

    Concept of Dbms

    • 1140 Words
    • 5 Pages

    The problems, other than redundancy, associated with the nondatabase approach to processing data include difficulties accessing related data, limited security features to protect data from access by unauthorized users, limited ability for multiple users to update the same data at the same time, and size limitations.…

    • 1140 Words
    • 5 Pages
    Powerful Essays
  • Powerful Essays

    This is a solution to a previous year’s assignment submitted by a former KXO206 Student (used with permission) KXO206 Database Management Systems Assignment 3: Database Creation Report Michael Cantwell Skid Marx Motor Inn Executive Summary The Skid Marx Motor Inn has multiple requirements for its database management system (DBMS). These relate primarily to their user of the DBMS to support the operation of their Inn. As such this report provides scripts and example outputs of these scripts. Ten requirements were specified by Skid Marx Motor Inn and each has been addressed in the following manner:…

    • 7096 Words
    • 63 Pages
    Powerful Essays
  • Satisfactory Essays

    access tutorial

    • 52738 Words
    • 211 Pages

    Microsoft-Access Tutorial Soren Lauesen E-mail: slauesen@itu.dk Version 2.4b: July 2011 Contents 1. The hotel system................................................... 4 2. Creating a database ............................................. 6 2.1 Create a database in Access ............................. 6 2.2 Create more tables ......................................... 10 2.3 Create relationships ....................................... 12 2.4 Look-up fields, enumeration type .................. 14 2.5 Dealing with trees and networks.................... 16 3. Access-based user interfaces ............................. 18 3.1 Forms and simple controls............................. 18 3.1.1 Text box, label and command button...... 18 3.1.2 Adjusting the controls............................. 20 3.1.3 Cleaning up the form .............................. 20 3.1.4 Shortcut keys for the user .......................…

    • 52738 Words
    • 211 Pages
    Satisfactory Essays