code - TABLE CREATION CREATE TABLE chasehpta.Client C_ID...

Info icon This preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
TABLE CREATION CREATE TABLE chasehpta.Client ( C_ID INT NOT NULL , F_Name TEXT(30) NOT NULL, M_I TEXT(1) NOT NULL, L_Name TEXT(30) NOT NULL, Street TEXT(40) NOT NULL, City TEXT(30) NOT NULL, State TEXT(2) NOT NULL, Zip TEXT(5) NOT NULL, Phone Varchar(10) NOT NULL, Email TEXT(40) NOT NULL, CC TEXT(16) NOT NULL, PRIMARY KEY (C_ID) ); CREATE TABLE chasehpta.Agent ( A_ID INT NOT NULL NOT NULL , A_Name TEXT(30) NOT NULL, A_Phone Varchar(10) NOT NULL, Salary DECIMAL(11,2) NOT NULL, DOB DATE NOT NULL NOT NULL, Com_rate DECIMAL(11,2) NOT NULL, PRIMARY KEY (A_ID) ); CREATE TABLE chasehpta.Vacation ( V_ID INT NOT NULL , Start DATE NOT NULL, End DATE NOT NULL, PRIMARY KEY (V_ID) ); CREATE TABLE chasehpta.Transaction ( V_ID INT NOT NULL , C_ID INT NOT NULL, GrandTotal DECIMAL(11,2) NOT NULL, TransactionDate DATE NOT NULL, PRIMARY KEY (V_ID, C_ID) ); CREATE TABLE chasehpta.COMHotel ( A_ID INT NOT NULL ,
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
HRes_ID INT NOT NULL, PRIMARY KEY (A_ID, HRes_ID) ); CREATE TABLE chasehpta.COMFlight ( A_ID INT NOT NULL , Flight_ID INT NOT NULL, PRIMARY KEY (A_ID, Flight_ID) ); CREATE TABLE chasehpta.COMCruise ( A_ID INT NOT NULL , Cruise_ID INT NOT NULL, PRIMARY KEY (A_ID, Cruise_ID) ); CREATE TABLE chasehpta.COMRentalCar ( A_ID INT NOT NULL , Car_ID INT NOT NULL, PRIMARY KEY (A_ID, Car_ID) ); CREATE TABLE chasehpta.Hotel ( Hotel_ID INT NOT NULL , H_Name TEXT(40) NOT NULL, Street TEXT(40) NOT NULL, City TEXT(30) NOT NULL, State TEXT(2) NOT NULL, Zip TEXT(5) NOT NULL, Phone Varchar(10) NOT NULL, Star_Rating INT NOT NULL, Room_Type TEXT(30) NOT NULL, Price DECIMAL (11, 2) NOT NULL, PRIMARY KEY (Hotel_ID) ); CREATE TABLE chasehpta.Flight( Flight_ID INT NOT NULL , Departure DATETIME NOT NULL, Arrival DATETIME NOT NULL, Airline TEXT(30) NOT NULL, Dest_D TEXT(30) NOT NULL, Dest_A TEXT(30) NOT NULL, Seat_Type TEXT(30) NOT NULL,
Image of page 2
Price DECIMAL (11,2) NOT NULL, PRIMARY KEY (Flight_ID) ); CREATE TABLE chasehpta.Cruise( Cruise_ID INT NOT NULL , Departure DATETIME NOT NULL, Arrival DATETIME NOT NULL, Cruiseline TEXT(30) NOT NULL, Dest_D TEXT(30) NOT NULL,
Image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern