ERD:
Normalization:
First Normalization Form:
Eliminating repeating groups
VIPStatus (VIPStatusID, VIPStatusName, DiscountPtge)
Company (CompanyID, CompanyName, Address, Phone, Fax, Email)
Customer (CustomerID, FirstName, LastName, Address, City, State, CompanyID, Mobile, PostCode, Email, CustomerTypeName, FFDiscount, VIPStatusID)
Staff (StaffID, StaffName, Address, Phone, Email, SupervisorID, CompanyID)
Location (LocationID, LocationName, State, City, PostCode)
TravelBooking (TravelID, DepartureDate, ArrivalDate, OverallTravelAmount, CustomerID, StaffID, CompanyID, NumAdult, NumChild, InvoiceDate, TravelPackageAmount, IsAmountPaid, TravelPackageID, Description, PackageAmount, DatePkgIssued, DatePkgExpired, DepartingDate, ReturnDate, AirlineID, AirlineName, DepartureLocationID, DestinationLocationID, FlightID, FlightName, DateOfDeparture, DateOfArrival, CabinClass, AirlineCharges, HotelID, HotelName, LocationID, Phone)
Eliminating redundant data
VIPStatus (VIPStatusID, VIPStatusName, DiscountPtge)
Company (CompanyID, CompanyName, Address, Phone, Fax, Email)
Customer (CustomerID, FirstName, LastName, Address, City, State, CompanyID, Mobile, PostCode, Email, CustomerTypeName, FFDiscount, VIPStatusID)
Staff (StaffID, StaffName, Address, Phone, Email, SupervisorID, CompanyID)
Location (LocationID, LocationName, State, City, PostCode)
Hotels (HotelID, HotelName, LocationID, Phone)
TravelPackage (TravelPackageID, Description, PackageAmount, DatePkgIssued, DatePkgExpired, DepartingDate, ReturnDate)
Airline (AirlineID, AirlineName, DepartureLocationID, DestinationLocationID, FlightID, FlightName, DateOfDeparture, DateOfArrival, CabinClass, AirlineCharges)
TravelBooking (TravelID, DepartureDate, ArrivalDate, OverallTravelAmount, CustomerID, StaffID, CompanyID, NumAdult, NumChild, InvoiceDate, TravelPackageAmount, IsAmountPaid, TravelPackageID, AirlineID, HotelID)
Remove Transitive Dependency
CustomerType (CustomerTypeID, CustomerTypeName)
Company (CompanyID, CompanyName, Address, Phone, Fax, Email)
Customer (CustomerID, FirstName, LastName, Address, City, State, CompanyID, Mobile, PostCode, Email, CustomerTypeID)
Staff (StaffID, StaffName, Address, Phone, Email, SupervisorID, CompanyID)
VIPStatus (VIPStatusID, VIPStatusName, DiscountPtge)
VIP (CustomerID, VIPStatusID)
FrequentFlyer (CustomerID, FFDiscount)
Location (LocationID, LocationName, State, City, PostCode)
Flight (FlightID, FlightName)
Hotels (HotelID, HotelName, LocationID, Phone)
TravelPackage (TravelPackageID, Description, PackageAmount, DatePkgIssued, DatePkgExpired, DepartingDate, ReturnDate)
Airline (AirlineID, AirlineName, DepartureLocationID, DestinationLocationID, FlightID, DateOfDeparture, DateOfArrival, CabinClass, AirlineCharges)
TravelBooking (TravelID, DepartureDate, ArrivalDate, OverallTravelAmount, CustomerID, StaffID, CompanyID, NumAdult, NumChild)
TravellingDetails (TravelPackageID, AirlineID, TravelID)
StayAt (HotelID, TravelID, TravelPackageID)
Invoice (InvoiceID, InvoiceDate, TravelPackageAmount, IsAmountPaid, TravelID, CustomerID)
Note:
Primary Key – Underline
Foreign Key – Italics
Relational Schema:
CustomerType (CustomerTypeID, CustomerTypeName)
Primary Key (CustomerTypeID)
Company (CompanyID, CompanyName, Address, Phone, Fax, Email)
Primary Key (CompanyID)
Customer (CustomerID, FirstName, LastName, Address, City, State, CompanyID, Mobile, PostCode, Email, CustomerTypeID)
Primary Key (CustomerID),
Foreign Key (CompanyID) References Company (CompanyID),
Foreign Key (CustomerTypeID) References CustomerType (CustomerTypeID)
Staff (StaffID, StaffName, Address, Phone, Email, SupervisorID, CompanyID)
Primary Key (StaffID),
Foreign Key (SupervisorID) References Staff (StaffID),
Foreign Key (CompanyID) References Company (CompanyID)
VIPStatus (VIPStatusID, VIPStatusName, DiscountPtge)
Primary Key (VIPStatusID)
VIP (CustomerID, VIPStatusID)
Primary Key (CustomerID),
Foreign Key (CustomerID) References Customer (CustomerID)
Foreign Key (VIPStatusID) References VIPStatus (VIPStatusID)
FrequentFlyer (CustomerID, FFDiscount)
Primary Key (CustomerID),
Foreign Key (CustomerID) References Customer (CustomerID)
Location (LocationID, LocationName, State, City, PostCode)
Primary Key (LocationID)
Flight (FlightID, FlightName)
Primary Key (FlightID)
Hotels (HotelID, HotelName, LocationID, Phone)
Primary Key (HotelID),
Foreign Key (LocationID) References Location (LocationID)
TravelPackage (TravelPackageID, Description, PackageAmount, DatePkgIssued, DatePkgExpired, DepartingDate, ReturnDate)
Primary Key (TravelPackageID)
Airline (AirlineID, AirlineName, DepartureLocationID, DestinationLocationID, FlightID, DateOfDeparture, DateOfArrival, CabinClass, AirlineCharges)
Primary Key (RestaurantID),
Foreign Key (DepartureLocationID) References Location (LocationID),
Foreign Key (DestinationLocationID) References Location (LocationID),
Foreign Key (FlightID) References Flight (FlightID)
TravelBooking (TravelID, DepartureDate, ArrivalDate, OverallTravelAmount, CustomerID, StaffID, CompanyID, NumAdult, NumChild)
Primary Key (TravelID),
Foreign Key (CustomerID) References Customer (CustomerID),
Foreign Key (StaffID) References Staff (StaffID),
Foreign Key (CompanyID) References Company (CompanyID)
TravellingDetails (TravelPackageID, AirlineID, TravelID)
Primary Key (TravelPackageID, AirlineID, TravelID),
Foreign Key (TravelPackageID) References TravelPackage (TravelPackageID),
Foreign Key (AirlineID) References Airline (AirlineID),
Foreign Key (TravelID) References TravelBooking (TravelID)
StayAt (HotelID, TravelID, TravelPackageID)
Primary Key (TravelPackageID, AirlineID, TravelID),
Foreign Key (TravelPackageID) References TravelPackage (TravelPackageID),
Foreign Key (HotelID) References Hotels (HotelID),
Foreign Key (TravelID) References TravelBooking (TravelID)
Invoice (InvoiceID, InvoiceDate, TravelPackageAmount, IsAmountPaid, TravelID, CustomerID)
Primary Key (InvoiceID),
Foreign Key (TravelID) References TravelBooking (TravelID),
Foreign Key (CustomerID) References Customer (CustomerID)
DROP TABLE IF EXISTS CustomerType ;
CREATE TABLE IF NOT EXISTS CustomerType (
CustomerTypeID INT NOT NULL,
CustomerTypeName VARCHAR(45) NOT NULL,
PRIMARY KEY (CustomerTypeID));
— —————————————————–
— Table Company
— —————————————————–
DROP TABLE IF EXISTS Company ;
CREATE TABLE IF NOT EXISTS Company (
CompanyID INT NOT NULL,
CompanyName VARCHAR(45) NOT NULL,
Address VARCHAR(60) NOT NULL,
Phone VARCHAR(15) NOT NULL,
Fax VARCHAR(15) NOT NULL,
Email VARCHAR(45) NOT NULL,
PRIMARY KEY (CompanyID));
— —————————————————–
— Table Customer
— —————————————————–
DROP TABLE IF EXISTS Customer ;
CREATE TABLE IF NOT EXISTS Customer (
CustomerID INT NOT NULL,
FirstName VARCHAR(25) NOT NULL,
LastName VARCHAR(25) NOT NULL,
Address VARCHAR(60) NOT NULL,
City VARCHAR(30) NOT NULL,
State VARCHAR(3) NOT NULL,
Mobile VARCHAR(15) NOT NULL,
PostCode INT NOT NULL,
Email VARCHAR(45) NOT NULL,
CustomerTypeID INT NOT NULL,
CompanyID INT NOT NULL,
PRIMARY KEY (CustomerID),
INDEX fk_Customer_CustomerType_idx (CustomerTypeID ASC),
INDEX fk_Customer_Company1_idx (CompanyID ASC),
CONSTRAINT fk_Customer_CustomerType
FOREIGN KEY (CustomerTypeID)
REFERENCES CustomerType (CustomerTypeID)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT fk_Customer_Company1
FOREIGN KEY (CompanyID)
REFERENCES Company (CompanyID)
ON DELETE NO ACTION
ON UPDATE NO ACTION);
— —————————————————–
— Table Staff
— —————————————————–
DROP TABLE IF EXISTS Staff ;
CREATE TABLE IF NOT EXISTS Staff (
StaffID INT NOT NULL,
StaffName VARCHAR(45) NOT NULL,
Address VARCHAR(60) NOT NULL,
Phone VARCHAR(15) NOT NULL,
Email VARCHAR(45) NOT NULL,
CompanyID INT NOT NULL,
SupervisorID INT NULL,
PRIMARY KEY (StaffID),
INDEX fk_Staff_Company1_idx (CompanyID ASC),
INDEX fk_Staff_Staff1_idx (SupervisorID ASC),
CONSTRAINT fk_Staff_Company1
FOREIGN KEY (CompanyID)
REFERENCES Company (CompanyID)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT fk_Staff_Staff1
FOREIGN KEY (SupervisorID)
REFERENCES Staff (StaffID)
ON DELETE NO ACTION
ON UPDATE NO ACTION);
— —————————————————–
— Table VIPStatus
— —————————————————–
DROP TABLE IF EXISTS VIPStatus ;
CREATE TABLE IF NOT EXISTS VIPStatus (
VIPStatusID INT NOT NULL,
VIPStatusName VARCHAR(45) NOT NULL,
DiscountPtge FLOAT NOT NULL,
PRIMARY KEY (VIPStatusID));
— —————————————————–
— Table VIP
— —————————————————–
DROP TABLE IF EXISTS VIP ;
CREATE TABLE IF NOT EXISTS VIP (
CustomerID INT NOT NULL,
VIPStatusID INT NOT NULL,
INDEX fk_VIP_Customer1_idx (CustomerID ASC),
INDEX fk_VIP_VIPStatus1_idx (VIPStatusID ASC),
PRIMARY KEY (CustomerID),
CONSTRAINT fk_VIP_Customer1
FOREIGN KEY (CustomerID)
REFERENCES Customer (CustomerID)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT fk_VIP_VIPStatus1
FOREIGN KEY (VIPStatusID)
REFERENCES VIPStatus (VIPStatusID)
ON DELETE NO ACTION
ON UPDATE NO ACTION);
— —————————————————–
— Table FrequentFlyer
— —————————————————–
DROP TABLE IF EXISTS FrequentFlyer ;
CREATE TABLE IF NOT EXISTS FrequentFlyer (
CustomerID INT NOT NULL,
FFDiscount FLOAT NOT NULL,
INDEX fk_FrequentFlyer_Customer1_idx (CustomerID ASC),
PRIMARY KEY (CustomerID),
CONSTRAINT fk_FrequentFlyer_Customer1
FOREIGN KEY (CustomerID)
REFERENCES Customer (CustomerID)
ON DELETE NO ACTION
ON UPDATE NO ACTION);
— —————————————————–
— Table Location
— —————————————————–
DROP TABLE IF EXISTS Location ;
CREATE TABLE IF NOT EXISTS Location (
LocationID INT NOT NULL,
LocationName VARCHAR(45) NOT NULL,
City VARCHAR(30) NOT NULL,
State VARCHAR(3) NOT NULL,
PostCode INT NOT NULL,
PRIMARY KEY (LocationID));
— —————————————————–
— Table Flight
— —————————————————–
DROP TABLE IF EXISTS Flight ;
CREATE TABLE IF NOT EXISTS Flight (
FlightID INT NOT NULL,
FlightName VARCHAR(45) NOT NULL,
PRIMARY KEY (FlightID));
— —————————————————–
— Table Hotels
— —————————————————–
DROP TABLE IF EXISTS Hotels ;
CREATE TABLE IF NOT EXISTS Hotels (
HotelID INT NOT NULL,
HotelName VARCHAR(45) NOT NULL,
Phone VARCHAR(15) NOT NULL,
Location_LocationID INT NOT NULL,
PRIMARY KEY (HotelID),
INDEX fk_Hotels_Location1_idx (Location_LocationID ASC),
CONSTRAINT fk_Hotels_Location1
FOREIGN KEY (Location_LocationID)
REFERENCES Location (LocationID)
ON DELETE NO ACTION
ON UPDATE NO ACTION);
— —————————————————–
— Table TravelPackage
— —————————————————–
DROP TABLE IF EXISTS TravelPackage ;
CREATE TABLE IF NOT EXISTS TravelPackage (
TravelPackageID INT NOT NULL,
Description VARCHAR(60) NOT NULL,
PackageAmount FLOAT NOT NULL,
DatePkgIssued DATE NOT NULL,
DatePkgExpired DATE NOT NULL,
DepartingDate DATE NOT NULL,
ReturnDate DATE NOT NULL,
PRIMARY KEY (TravelPackageID));
— —————————————————–
— Table Airline
— —————————————————–
DROP TABLE IF EXISTS Airline ;
CREATE TABLE IF NOT EXISTS Airline (
AirlineID INT NOT NULL,
AirlineName VARCHAR(45) NOT NULL,
DateOfDeparture DATE NOT NULL,
DateOfArrival DATE NULL,
CabinClass VARCHAR(30) NOT NULL,
AirlineCharges FLOAT NOT NULL,
DepartureLocationID INT NOT NULL,
DestinationLocationID INT NOT NULL,
FlightID INT NOT NULL,
PRIMARY KEY (AirlineID),
INDEX fk_Airline_Location1_idx (DepartureLocationID ASC),
INDEX fk_Airline_Location2_idx (DestinationLocationID ASC),
INDEX fk_Airline_Flight1_idx (FlightID ASC),
CONSTRAINT fk_Airline_Location1
FOREIGN KEY (DepartureLocationID)
REFERENCES Location (LocationID)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT fk_Airline_Location2
FOREIGN KEY (DestinationLocationID)
REFERENCES Location (LocationID)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT fk_Airline_Flight1
FOREIGN KEY (FlightID)
REFERENCES Flight (FlightID)
ON DELETE NO ACTION
ON UPDATE NO ACTION);
— —————————————————–
— Table TravelBooking
— —————————————————–
DROP TABLE IF EXISTS TravelBooking ;
CREATE TABLE IF NOT EXISTS TravelBooking (
TravelID INT NOT NULL,
DepartureDate DATE NOT NULL,
ArrivalDate DATE NOT NULL,
OverallTravelAmount FLOAT NOT NULL,
NumAdult INT NOT NULL,
NumChild INT NOT NULL,
CustomerID INT NOT NULL,
StaffID INT NOT NULL,
CompanyID INT NOT NULL,
PRIMARY KEY (TravelID),
INDEX fk_TravelBooking_Customer1_idx (CustomerID ASC),
INDEX fk_TravelBooking_Staff1_idx (StaffID ASC),
INDEX fk_TravelBooking_Company1_idx (CompanyID ASC),
CONSTRAINT fk_TravelBooking_Customer1
FOREIGN KEY (CustomerID)
REFERENCES Customer (CustomerID)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT fk_TravelBooking_Staff1
FOREIGN KEY (StaffID)
REFERENCES Staff (StaffID)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT fk_TravelBooking_Company1
FOREIGN KEY (CompanyID)
REFERENCES Company (CompanyID)
ON DELETE NO ACTION
ON UPDATE NO ACTION);
— —————————————————–
— Table TravellingDetails
— —————————————————–
DROP TABLE IF EXISTS TravellingDetails ;
CREATE TABLE IF NOT EXISTS TravellingDetails (
TravelID INT NOT NULL,
TravelPackageID INT NOT NULL,
AirlineID INT NOT NULL,
INDEX fk_TravellingDetails_TravelBooking1_idx (TravelID ASC),
INDEX fk_TravellingDetails_TravelPackage1_idx (TravelPackageID ASC),
INDEX fk_TravellingDetails_Airline1_idx (AirlineID ASC),
PRIMARY KEY (TravelID, TravelPackageID, AirlineID),
CONSTRAINT fk_TravellingDetails_TravelBooking1
FOREIGN KEY (TravelID)
REFERENCES TravelBooking (TravelID)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT fk_TravellingDetails_TravelPackage1
FOREIGN KEY (TravelPackageID)
REFERENCES TravelPackage (TravelPackageID)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT fk_TravellingDetails_Airline1
FOREIGN KEY (AirlineID)
REFERENCES Airline (AirlineID)
ON DELETE NO ACTION
ON UPDATE NO ACTION);
— —————————————————–
— Table StayAt
— —————————————————–
DROP TABLE IF EXISTS StayAt ;
CREATE TABLE IF NOT EXISTS StayAt (
HotelID INT NOT NULL,
TravelID INT NOT NULL,
TravelPackageID INT NOT NULL,
INDEX fk_StayAt_Hotels1_idx (HotelID ASC),
INDEX fk_StayAt_TravelBooking1_idx (TravelID ASC),
INDEX fk_StayAt_TravelPackage1_idx (TravelPackageID ASC),
PRIMARY KEY (HotelID, TravelID, TravelPackageID),
CONSTRAINT fk_StayAt_Hotels1
FOREIGN KEY (HotelID)
REFERENCES Hotels (HotelID)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT fk_StayAt_TravelBooking1
FOREIGN KEY (TravelID)
REFERENCES TravelBooking (TravelID)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT fk_StayAt_TravelPackage1
FOREIGN KEY (TravelPackageID)
REFERENCES TravelPackage (TravelPackageID)
ON DELETE NO ACTION
ON UPDATE NO ACTION);
— —————————————————–
— —————————————————–
DROP TABLE IF EXISTS Invoice ;
CREATE TABLE IF NOT EXISTS Invoice (
InvoiceID INT NOT NULL,
InvoiceDate DATE NOT NULL,
TravelPackageAmount FLOAT NOT NULL,
IsAmountPaid VARCHAR(1) NOT NULL,
TravelID INT NOT NULL,
CustomerID INT NOT NULL,
PRIMARY KEY (InvoiceID),
INDEX fk_Invoice_TravelBooking1_idx (TravelID ASC),
INDEX fk_Invoice_Customer1_idx (CustomerID ASC),
CONSTRAINT fk_Invoice_TravelBooking1
FOREIGN KEY (TravelID)
REFERENCES TravelBooking (TravelID)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT fk_Invoice_Customer1
FOREIGN KEY (CustomerID)
REFERENCES Customer (CustomerID)
ON DELETE NO ACTION
ON UPDATE NO ACTION);
We provide professional writing services to help you score straight A’s by submitting custom written assignments that mirror your guidelines.
Get result-oriented writing and never worry about grades anymore. We follow the highest quality standards to make sure that you get perfect assignments.
Our writers have experience in dealing with papers of every educational level. You can surely rely on the expertise of our qualified professionals.
Your deadline is our threshold for success and we take it very seriously. We make sure you receive your papers before your predefined time.
Someone from our customer support team is always here to respond to your questions. So, hit us up if you have got any ambiguity or concern.
Sit back and relax while we help you out with writing your papers. We have an ultimate policy for keeping your personal and order-related details a secret.
We assure you that your document will be thoroughly checked for plagiarism and grammatical errors as we use highly authentic and licit sources.
Still reluctant about placing an order? Our 100% Moneyback Guarantee backs you up on rare occasions where you aren’t satisfied with the writing.
You don’t have to wait for an update for hours; you can track the progress of your order any time you want. We share the status after each step.
Although you can leverage our expertise for any writing task, we have a knack for creating flawless papers for the following document types.
Although you can leverage our expertise for any writing task, we have a knack for creating flawless papers for the following document types.
From brainstorming your paper's outline to perfecting its grammar, we perform every step carefully to make your paper worthy of A grade.
Hire your preferred writer anytime. Simply specify if you want your preferred expert to write your paper and we’ll make that happen.
Get an elaborate and authentic grammar check report with your work to have the grammar goodness sealed in your document.
You can purchase this feature if you want our writers to sum up your paper in the form of a concise and well-articulated summary.
You don’t have to worry about plagiarism anymore. Get a plagiarism report to certify the uniqueness of your work.
Join us for the best experience while seeking writing assistance in your college life. A good grade is all you need to boost up your academic excellence and we are all about it.
We create perfect papers according to the guidelines.
We seamlessly edit out errors from your papers.
We thoroughly read your final draft to identify errors.
Work with ultimate peace of mind because we ensure that your academic work is our responsibility and your grades are a top concern for us!
Dedication. Quality. Commitment. Punctuality
Here is what we have achieved so far. These numbers are evidence that we go the extra mile to make your college journey successful.
We have the most intuitive and minimalistic process so that you can easily place an order. Just follow a few steps to unlock success.
We understand your guidelines first before delivering any writing service. You can discuss your writing needs and we will have them evaluated by our dedicated team.
We write your papers in a standardized way. We complete your work in such a way that it turns out to be a perfect description of your guidelines.
We promise you excellent grades and academic excellence that you always longed for. Our writers stay in touch with you via email.