In: Computer Science
project on hotel management in dbms with er diagram and table (sql)
please give answer
Short Summary:
ER DIAGRAM:
Entities:
TABLES:
CREATE TABLE Hotel(
HotelID INT PRIMARY KEY,
HotelName VARCHAR(30),
emailID VARCHAR(50),
PhoneNumber INT)
CREATE TABLE Rooms(
RoomNo INT PRIMARY KEY,
RoomType VARCHAR(20),
HotelID INT,
FOREIGN KEY(HotelID) REFERENCES Hotel(HotelID))
CREATE TABLE Cost(
costid INT PRIMARY KEY,
RoomNo INT,
amount DECIMAL(18,2),
FOREIGN KEY(RoomNo) REFERENCES Rooms(RoomNo))
CREATE TABLE Facilities(
Fid INT PRIMARY KEY,
FacilityName VARCHAR(20),
HotelID INT,
FOREIGN KEY(HotelID) REFERENCES Hotel(HotelID)
)
CREATE TABLE Location(
LocationID INT PRIMARY KEY,
street VARCHAR(20),
City VARCHAR(20),
state VARCHAR(20),
pincode INT PRIMARY KEY)
**************************************************************************************
Feel free to rate the answer and comment your questions, if you have any.
Please upvote the answer and appreciate our time.
Happy Studying!!!
**************************************************************************************