Ok, here are the tables, what I want to do exactly is to develop a website, where people can actually search for vacation packages based on an amount, duration and location. Once they click on search plan, it will display the available package based on their input on another page
with description of the hotel or rooms or the country and city which they intend to go, once the package is ok with the client, they can select the package and submit for the administrator to make the booking for them or they can make the booking themselves online by paying with their credit cards or atm.
I do not know if I can achieve these with what I have done here because I am so new with these database thing but will like to learn and become a guru in it, any assistance or help will be appreciated. thanks
Database: vacation_planning
[code]
--
-- Table structure for table airlines
CREATE TABLE IF NOT EXISTS airlines (
airline_id int(9) NOT NULL auto_increment,
airline_name varchar(50) NOT NULL,
country_id int(9) NOT NULL,
city_id int(9) NOT NULL,
PRIMARY KEY (airline_id)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
--
-- Dumping data for table airlines
--
-- Table structure for table airports
CREATE TABLE IF NOT EXISTS airports (
airprot_id int(9) NOT NULL auto_increment,
airport_name varchar(50) NOT NULL,
airport_city int(9) NOT NULL,
airport_country int(9) NOT NULL,
PRIMARY KEY (airprot_id)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
--
-- Dumping data for table airports
--
-- Table structure for table city
CREATE TABLE IF NOT EXISTS city (
city_id int(9) NOT NULL auto_increment,
cities varchar(50) NOT NULL,
country_id int(9) NOT NULL,
PRIMARY KEY (city_id)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
--
-- Dumping data for table city
--
-- Table structure for table country
CREATE TABLE IF NOT EXISTS country (
country_id int(9) NOT NULL auto_increment,
countries varchar(50) NOT NULL,
PRIMARY KEY (country_id)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
--
-- Dumping data for table country
--
-- Table structure for table customers
CREATE TABLE IF NOT EXISTS customers (
customer_id int(9) NOT NULL auto_increment,
customer_fname varchar(50) NOT NULL,
customer_lname varchar(50) NOT NULL,
customer_address varchar(250) NOT NULL,
customer_city int(9) NOT NULL,
customer_country int(9) NOT NULL,
customer_phone varchar(50) NOT NULL,
customer_email varchar(50) NOT NULL,
PRIMARY KEY (customer_id)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
--
-- Dumping data for table customers
--
-- Table structure for table flights
CREATE TABLE IF NOT EXISTS flights (
flight_id int(9) NOT NULL auto_increment,
flight_no varchar(50) NOT NULL,
airline_name int(9) NOT NULL,
departure_city int(9) NOT NULL,
arrival_city int(9) NOT NULL,
departure_date timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
arrival_date timestamp NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (flight_id)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
--
-- Dumping data for table flights
--
-- Table structure for table hotels
CREATE TABLE IF NOT EXISTS hotels (
hotel_id int(9) NOT NULL auto_increment,
hotel_name varchar(50) NOT NULL,
hotel_address varchar(250) NOT NULL,
hotel_city int(9) NOT NULL,
hotel_country int(9) NOT NULL,
hotel_pictures blob NOT NULL,
hotel_description longtext NOT NULL,
PRIMARY KEY (hotel_id)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
--
-- Dumping data for table hotels
--
-- Table structure for table hotel_rooms
CREATE TABLE IF NOT EXISTS hotel_rooms (
hotel_room_id int(9) NOT NULL auto_increment,
hotel_name int(9) NOT NULL,
hotel_room_no varchar(50) NOT NULL,
room_type varchar(50) NOT NULL,
room_price varchar(50) NOT NULL,
bed_size varchar(50) NOT NULL,
PRIMARY KEY (hotel_room_id)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
--
-- Dumping data for table hotel_rooms
--
-- Table structure for table price
CREATE TABLE IF NOT EXISTS price (
price_id int(9) NOT NULL auto_increment,
planning_price varchar(250) NOT NULL,
PRIMARY KEY (price_id)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
--
-- Dumping data for table price
--
-- Table structure for table vacation_booking
CREATE TABLE IF NOT EXISTS vacation_booking (
vacation_booking_id int(9) NOT NULL auto_increment,
flight_id int(9) NOT NULL,
hotel_id int(9) NOT NULL,
room_id int(9) NOT NULL,
customer_id int(9) NOT NULL,
ref_booking varchar(50) NOT NULL,
PRIMARY KEY (vacation_booking_id)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
--
-- Dumping data for table vacation_booking
--
-- Table structure for table vacation_planning
CREATE TABLE IF NOT EXISTS vacation_planning (
vacation_planning_id int(9) NOT NULL auto_increment,
flight_id int(9) NOT NULL,
city_id int(9) NOT NULL,
price_id int(9) NOT NULL,
hotel_id int(9) NOT NULL,
room_id int(9) NOT NULL,
country_id int(9) NOT NULL,
PRIMARY KEY (vacation_planning_id)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;[/code]