subject
Computers and Technology, 03.09.2021 02:10 oshagie

The following tables form part of a database held in a relational DBMS: Hotel (hotelNo, hotelName, city)
Room (roomNo, hotelNo, type, price)
Booking (hotelNo, guestNo, dateFrom, dateTo, roomNo)
Guest (guestNo, guestName, guestAddress)
where Hotel contains hotel details and hotelNo is the primary key;
Room contains room details for each hotel and (roomNo, hoteINo) forms the primary key;
Booking contains details of bookings and (hoteINo, guestNo, dateFrom) forms the primary key;
Guest contains guest details and guestNo is the primary key.
4.8 Identify the foreign keys in this schema. Explain how the entity and referential integrity rules apply to these relations.
4.9 Produce some sample tables for these relations that observe the relational integrity rules. Suggest some general
constraints that would be appropriate for this schema.
4.10 Analyze the RDBMSs that you are currently using. Determine the support the system provides for primary keys,
alternate keys, foreign keys, relational integrity, and views.
4.11 Implement the above schema in one of the RDBMSs you currently use. Generate two
For Exercises 6.7–6.28, use the Hotel schema defined at the start of the Exercises at the end of Chapter 4.
Simple queries
6.7 List full details of all hotels.
6.8 List full details of all hotels in London.
6.9 List the names and addresses of all guests living in London, alphabetically ordered by name.
6.10 List all double or family rooms with a price below £40.00 per night, in ascending order of price.
6.11 List the bookings for which no dateTo has been specified.
Aggregate functions
6.12 How many hotels are there?
6.13 What is the average price of a room?
6.14 What is the total revenue per night from all double rooms?
6.15 How many different guests have made bookings for August?
Subqueries and joins
6.16 List the price and type of all rooms at the Grosvenor Hotel.
6.17 List all guests currently staying at the Grosvenor Hotel.
6.18 List the details of all rooms at the Grosvenor Hotel, including the name of the guest staying in the room, if the
room is occupied.
6.19 What is the total income from bookings for the Grosvenor Hotel today?
6.20 List the rooms that are currently unoccupied at the Grosvenor Hotel.
6.21 What is the lost income from unoccupied rooms at the Grosvenor Hotel?
Grouping
6.22 List the number of rooms in each hotel.
6.23 List the number of rooms in each hotel in London.
6.24 What is the average number of bookings for each hotel in August?
6.25 What is the most commonly booked room type for each hotel in London?
6.26 What is the lost income from unoccupied rooms at each hotel today?
Populating tables
6.27 Insert rows into each of these tables.
6.28 Update the price of all rooms by 5%.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 03:50
You are working as a security analyst in a company xyz that owns the whole subnet range of 23.0.0.0/8 and 192.168.0.0/8. while monitoring the data, you find a high number of outbound connections. you see that ip's owned by xyz (internal) and private ip's are communicating to a single public ip. therefore, the internal ip's are sending data to the public ip. after further analysis, you find out that this public ip is a blacklisted ip, and the internal communicating devices are compromised. what kind of attack does the above scenario depict?
Answers: 3
question
Computers and Technology, 22.06.2019 16:50
Consider a slotted aloha system, where the time slot equals the fixed duration of each packet. assume that there are 4 stations a,b,c,d sharing the medium. (a) stations a,b,c,d receive one packet each from higher layers at times 1.3, 1.5, 2.6,5.7 respectively. show which transmissions take place when, according to the slottedaloha protocol; describe all transmissions until all four packets have been successful.when needed, each station has access to the following sequence of random number, provided by a random number generator and drawn uniformly between 0 and 1: (1) station a draws numbers: 0.31, 0.27, 0.78, 0.9, 0.9, 0.11, 0. (2) station b draws numbers: 0.45, 0.28, 0.11, 0.83, 0.37, 0.22, 0. (3)station c draws numbers: 0.1, 0.2, 0.3, 0.4, 0. (4) station d draws numbers: 0.36, 0.77, 0.9, 0.1, 0.1, 0.1, 0.1, 0. (b) in slotted aloha, a station transmits in each time slot with a given probability. what probabilities would you assign to each of the four stations so as to: (i) maximize the efficiency of the protocol? (ii) maximize fairness among the four stations? (c) will the efficiency increase or decrease if we modify slotted aloha as follows: (i) get rid of slots and allow stations to transmit immediately? (ii) implement carrier sensing? (iii) implement collision detection? (iv) implement collision avoidance?
Answers: 3
question
Computers and Technology, 23.06.2019 07:30
What is the penalty for violating section 1201 of title 17 chapter 21 of the us code
Answers: 1
question
Computers and Technology, 24.06.2019 16:50
7.23 main lab 7 - online shopping cart background this main lab extends the earlier prep lab "online shopping cart part 1". (you should save this as a separate project from the earlier prep lab). you will create an on-line shopping cart like you might use for your on-line purchases. the goal is to become comfortable with setting up classes and using objects. requirements this lab can be done individually or as pair programming. expanded itemtopurchase class (15 points) extend the itemtopurchase class as follows. we will not do unit testing in this lab so we will not be giving you the names of the member functions. create good ones on your own. create a parameterized constructor to assign item name, item description, item price, and item quantity (default values of "none" for name and description, and 0 for price and quantity). additional public member functions set an item description get an item description print the cost of an item - outputs the item name followed by the quantity, price, and subtotal (see example) print the description of an item - outputs the item name and description (see example) additional private data members a string for the description of the item. example output of the function which prints the cost of an item: bottled water 10 @ $1.50 = $15.00 example output of the function which prints the item description:
Answers: 1
You know the right answer?
The following tables form part of a database held in a relational DBMS: Hotel (hotelNo, hotelName,...
Questions
question
Mathematics, 24.01.2022 02:50
Questions on the website: 13722360