edjkldjksdjk ewejkjkasjsdjksd Hotel Schema drop table Hotel cascade constraints; drop table Room cascade constraints; drop table Guest cascade

edjkldjksdjk
ewejkjkasjsdjksd

Hotel Schema

Don't use plagiarized sources. Get Your Custom Assignment on
edjkldjksdjk ewejkjkasjsdjksd Hotel Schema drop table Hotel cascade constraints; drop table Room cascade constraints; drop table Guest cascade
From as Little as $13/Page

drop table Hotel cascade constraints;
drop table Room cascade constraints;
drop table Guest cascade constraints;
drop table Booking cascade constraints;
Create Table Hotel(
hotelNo VarChar(3),
hotelName VarChar(20),
city VarChar(20),
Primary key (hotelNo));

Create table Room(
roomNo Number(3),
hotelNo VarChar(4),
type Char(1),
price Decimal(7),
Primary key (roomNo, hotelNo),
Foreign Key (hotelNo) References Hotel(hotelNo));

Create table Guest(
guestNo VarChar(6),
guestName Char(50),
guestAddress Char(50),
Primary key (guestNo));

Create table Booking(
hotelNo VarChar(4),
guestNo VarChar(6),
dateFrom DATE,
dateTo DATE,
roomNo Number(3),
Primary key (hotelNo, guestNo, dateFrom),
Foreign Key (hotelNo) References Hotel(hotelNo),
Foreign Key (guestNo) References Guest(guestNo));
Insert into Hotel values (‘452’, ‘Residence Inn’, ‘Scranton’);
Insert into Hotel values (‘981’, ‘Marriott’, ‘Tallahassee’);
Insert into Room values (104, ‘452’, ‘D’, 79);
Insert into Room values (509, ‘981’, ‘F’, 100);
Insert into Guest values (‘600798’, ‘Thomas Hughes’, ‘1 Autumn Way Jessup,
MD’);
Insert into Guest values (‘123456’, ‘Sheeka Tull’, ’52 Gallaway St Baltimore,
MD’);
Insert into Booking values (‘452’, ‘600798’, ’11-Apr-2010′, ’21-Apr-2010′,
104);
Insert into Booking values (‘981’, ‘123456’, ‘1-Feb-2010’, ‘5-Feb-2010’,
509);

SQL1/
For SQL Assignment #1: Exercises 6.7, 6.9, 6.11, 6.13, 6.17, load and run the
Hotel Schema file located in the Hotel Schema folder. Write SQL commands to
answer the above questions, run each command on ORACLE DBMS and save
them using SQL92 or later, etc. Submit your final list of SQL commands here as
an attachment or paste in the text editor.

SQL2/

For SQL Assignment #2: Do Exercises 6.8, 6.10, 6.12, 6.14, 6.16

Write SQL commands to answer the above questions, run each command on
ORACLE DBMS and save them using SQL92 or later. Submit your final list of
SQL commands here as an attachment or paste in the text editor.

SQL3 /
For SQL Assignment #3, Do Exercises 6.22 to 6.26.
Write SQL commands to answer the above questions, run each command on
ORACLE DBMS and save them using SQL-92 or later. Submit your final list of
SQL commands here as an attachment or paste in the text editor.

Leave a Comment

Your email address will not be published. Required fields are marked *