Cse 2004: Databse Manegment Systems Lab Digital Assignment 1
Cse 2004: Databse Manegment Systems Lab Digital Assignment 1
SYSTEMS
LAB DIGITAL ASSIGNMENT 1
Slot: L3+L4
• Cab Booking
create table cab_booking(
cab_book_id number(5) NOT NULL,
cab_id number(2) NOT NULL,
tour_bookingid number(3) NOT NULL,
cab_from varchar(25)NOT NULL,
cab_to varchar(25) NOT NULL,
amount number(4) NOT NULL,
foreign key(tour_bookingid) references tour_inf(tour_id),
primary key(cab_id));
• Flight booking
create table flight_bookings(
booking_id number(3) NOT NULL UNIQUE,
booking_date date NOT NULL,
customer_id number(4) NOT NULL,
flight_no number(4) NOT NULL,
flight_from varchar2(25) NOT NULL,
flight_to varchar2(25) NOT NULL,
airline_name varchar2(20) NOT NULL,
journey_date date NOT NULL,
arrival_time timestamp NOT NULL,
dep_time timestamp NOT NULL,
no_of_tickets number(2) NOT NULL,
fare number(5) NOT NULL,
tour_bookid number(3) NOT NULL,
primary key(customer_id));
• Hotel booking
create table hotel_booking(
tour_booking_id number(3) NOT NULL UNIQUE,
hotel_name varchar2(10) NOT NULL,
hotel_location varchar2(20) NOT NULL,
from_date varchar2(10) NOT NULL,
to_date varchar2(10) NOT NULL,
no_of_person number(2) NOT NULL,
amount number(4) NOT NULL,
book_date varchar2(10) NOT NULL,
hotel_bookid number(3) NOT NULL,
foreign key (tour_booking_id) references tour_inf(tour_id),
primary key(hotel_bookid));
2.3 Write a query to drop all the constraints of Hotel booking table
3.1 and 3.2 Write a query to add column in total login count in the customer login table
Write a query to change the datatype of login_date (Customer login table) to
timestamp and remove the login_time column from the table.
4.1 Remove all the rows permanently from the driver table
4.9 List all tour details within a range given by the user
4.10 List all the customers who have submitted only one ID proof.