You are on page 1of 1

Re-CAT – II Lab L43+L44

School of Computer Science Engineering and Information Systems


BITE302P – DATABASE SYSTEMS LAB
Date: 17/Apr/2024 Total Marks: 15

Instruction: Take screen shots of create table statements, Constraint Statements, data
present in each table using select statement and SQL queries along with their output.

Consider the business trip database that keeps track of the business trips of salesman in an
office. Following are the tables:

SALESMAN (SNO, S_NAME, MOBILE_NUMBER, DATE-OF-JOINING)

TRIP (TNO, FROM_CITY, TO_CITY, DEPARTURE_DATE, RETURN)

DEPT (DEPTNO, DEPT_NAME, LOCATION, BUDGET)

Create the tables with necessary constraints and appropriate insertions. [3 Marks]

Constraints [2X2=4 Marks]

1. Ensure that location of the department is only as ‘Chennai’, ‘Pune’, and ‘Cochin’.
2. Please confirm that mobile number is mandatory for all salesmen.

SQL Queries: [2X4=8 Marks]

1. Find the department whose budget is lesser than 10000 and department must start
with ‘D’.
2. Display the details of the department whose budget is not equal to the max budget
allotted for all the departments.
3. List the salesman numbers and names of the salesmen who made trips on ’10-April-
2024’.
4. Find the number of trips made by all the salesmen.

You might also like