Schema hotel
SQL>CREATE USER HOTEL IDENTIFIED BY HOTEL
DEFAULT TABLESPACE USERS
QUOTA UNLIMITED ON USERS;
SQL>GRANT DBA TO HOTEL;
SQL>CONNECT HOTEL/HOTEL;
SQL>CREATE TABLE HOTEL
(
HOTELNO NUMBER(7),
HOTELNAME VARCHAR2(50),
CITY VARCHAR2(50)
);
SQL>CREATE TABLE ROOM
(
ROOMNO NUMBER(7),
HOTELNO NUMBER(7),
TYPE NUMBER(7),
PRICE NUMBER(7)
);
SQL>CREATE TABLE BOOKING
(
HOTELNO NUMBER(7),
GUESTNO NUMBER(7),
DATEFROM DATE,
DATETO DATE,
ROOMNO NUMBER(7)
);
SQL>CREATE TABLE GUEST
(
GUESTNO NUMBER(7),
GUESTNAME VARCHAR2(50),
GUESTADDRESS VARCHAR2(50)
);
No comments:
Post a Comment