0% found this document useful (0 votes)
56 views18 pages

Database Management Systems. Digital Assignment-1: SLOT: L-35 L-36 PROF. Sashikaran

This document provides instructions for creating and manipulating tables in a database management system to store information about trains, tickets, passengers, and fares. It includes tasks like creating tables with specified columns and data types, inserting sample data, retrieving data through queries, updating and deleting rows, and adding constraints to table columns. The document contains 15 multi-part tasks to design, populate and query the tables to complete the assignment.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views18 pages

Database Management Systems. Digital Assignment-1: SLOT: L-35 L-36 PROF. Sashikaran

This document provides instructions for creating and manipulating tables in a database management system to store information about trains, tickets, passengers, and fares. It includes tasks like creating tables with specified columns and data types, inserting sample data, retrieving data through queries, updating and deleting rows, and adding constraints to table columns. The document contains 15 multi-part tasks to design, populate and query the tables to complete the assignment.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

ITE-1003

DATABASE MANAGEMENT
SYSTEMS.

DIGITAL ASSIGNMENT-1
SLOT: L-35 L-36
PROF. Sashikaran

18BIT0142
Alankrit
Bhardwaj
1.2 Use ADT (varray) for class and days column in Train table.

Create all the tables specified above. Make underlined columns as primary key. (use number, number
(m,n), varchar (n), date, time, timestamp datatypes appropriately) Insert atleast 5 rows to each table.

TABLE TRAIN:
TABLE TICKET:

TABLE PASSENGER:
TABLE TRAIN_ROUTE:

TABLE TRAIN_TICKET_FARE:
1.1 Use Interactive insertion for inserting rows to the table.
2.1 Remove all the rows from Passenger table permanently.

2.2 Change the name of the Passenger table to Passenger_Details.


2.3 List all train details.
2.4 List all passenger details.
2.5 Give a list of trains in ascending order of number.
2.6 List the senior citizen passengers details.

2.7 List the station names where code starts with 'M'.
2.8 List the trains details within a range of numbers.
2.9 Change the superfast charge value in train fare as zero , if it is null.

2.10 List the passenger names whose tickets are not confirmed.

2.12 Find the ticket details where transaction id is not known.


2.11 List the base_fare of all AC coaches available in each train
2.13 Use Interactive updation for updating the seat no for particular PNR NO.

2.14 Find the train names that are from Chennai to Mumbai, but do not have the source or destination
in its name.

2.15 Find the train details that are on Thursday (Use the ADT column created).
3.1 Add a suitable constraint to train table to always have train no in the range 10001 to
99999.

3.2 Add a suitable constraint for the column of station name, so that does not take duplicates.

3.3 Change the data type of arrival time, depart time (date -> timestamp or timestamp to date), and
do the necessary process for updating the table with new values.
3.4 Add a suitable constraint for the class column that it should take values only as 1A, 2A, 3A, SL, C.

3.5 Add a not null constraint for the column distance in train_route.

END.

THANK YOU

You might also like