Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Directions: This is my ER diagram, I need help getting an idea on how to write a query for the statements listed below. 1. NOTE[THIS

image text in transcribed

Directions: This is my ER diagram, I need help getting an idea on how to write a query for the statements listed below.

1. NOTE[THIS ONE SHOULD BE A PROCEDURE OR FUNCTION] SpecificHotelReport: Input: hotelID, start-date, end-date. Print (for the given time interval):

Income by room type

Income of services, by service type

Total income from all sources.

IS420 2617 PALYO1.RESERVATION P RESERVATION ID F * GUEST ID F ROOM_ID NUMBER NUMBER NUMBER DATE DATE IS420 2617 PALYO1.GUEST IS420 2617 PALYO1.SERVICE LINE START_DATE END DATE RESERVATION DATE DATE IS_CANCELED RATE_PER_DAY DISCOUNT P * GUEST ID NUMBER P SERVICE ID NUMBER DATE GUEST_NAME VARCHAR2 (50 BYTE) SERVICE_DATE NUM_ROOMS GUEST_PK (GUEST_ID) GUEST-PK(GUEST-ID) NUMBER VARCHAR2 (5 BYTE) NUMBER (9,2) NUMBER (9,2) F SERVICE TYPE ID NUMBER F RESERVATION ID NUMBER ? SERVICE_PK (SERVICE_ID) RESERVATION_PK (RESERVATION ID) ? SERVICE-PK (SERVICE-ID) ? RESERVATION-PK (RESERVATION-ID) IS420 2617 PALYO1.HOTEL P HOTEL ID NUMBER VARCHAR2 (50 BYTE) VARCHAR2 (50 BYTE) VARCHAR2 (50 BYTE) CHAR (2 BYTE) VARCHAR2 (20 BYTE) VARCHAR2 (5 BYTE) IS420 2617 PALYO1.SERVICES HOTEL_NAME HOTEL_ADDRESS IS420 2617 PALYO1.ROOMM P SERVICE TYPE U SERVICE DESC ID NUMBER HOTEL_CITY HOTEL STATE HOTEL_ZIP P ROOM ID F HOTEL_ID NUMBER NUMBER VARCHAR2 (50 BYTE) NUMBER (9,2) SERVICE_COST SERVICE_DESC_UQ (SERVICE_DESC) SERVICE_TYPE_PK (SERVICE_TYPE_ID) SERVICE-TYPE-PK (SERVICE-TYPE-ID) SERVICE-DESC-UQ (SERVICE-DESC) ROOM_NUMBER VARCHAR2 (50 BYTE) ROOM TYPE ROOM_PK (ROOM_ID) ROOM-PK (ROOM-ID) VARCHAR2 (50 BYTE) IS SOLD HOTEL_PK (HOTEL_ID) ? ? ? ? HOTEL-PK(HOTEL-ID)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Driven Web Sites

Authors: Mike Morrison, Joline Morrison

1st Edition

061901556X, 978-0619015565

More Books

Students also viewed these Databases questions

Question

What is the difference between Needs and GAP Analyses?

Answered: 1 week ago

Question

What are ERP suites? Are HCMSs part of ERPs?

Answered: 1 week ago