Sie sind auf Seite 1von 3

School of Information Technology and Engineering

Department of Information Technology


B. Tech. (IT)
Database Management Systems (ITE1003)
Lab CAT I August 2019

Slot: L35+L36 Class Number: 2586 (SET A)


Duration: Eighty Minutes Maximum Marks: 25

Instructions: Take screen shots of create table statement, insert statement, data present in each table and
queries along with their output.

Consider the following relational database schema. The primary keys are underlined. The foreign key is
self-explanatory.
CUSTOMER(Cus_id, Cus_name, Cus_address, Cus_phone)
ORDERS(Order_id, Order_date, Bill_amount, Cus_id)
1. Implement the necessary SQL statements for creating the above tables with necessary primary key and
foreign key. (8)
2. Implement the necessary SQL statement to specify the constraint that (i) the customer id is between
10001 and 99999 and (ii) customer phone number column cannot have duplicate values. (4)
3. Enter at least two rows interactively into each table and display the content of the tables. (4)
4. Implement SQL statement for the following queries.
(a) List the name and phone number of customers who live in Vellore area. (3)
(b) List customer name and customer phone number in ascending order of customer id. (3)
(c) Change the bill amount to zero if it is null. (3)
School of Information Technology and Engineering
Department of Information Technology
B. Tech. (IT)
Database Management Systems (ITE1003)
Lab CAT I August 2019

Slot: L35+L36 Class Number: 2586 (SET B)


Duration: Eighty Minutes Maximum Marks: 25

Instructions: Take screen shots of create table statement, insert statement, data present in each table and
queries along with their output.

Consider the following relational database schema. The primary keys are underlined. The foreign key is
self-explanatory.
EMPLOYEE(Emp_id, Emp_name, Email, Office_code)
OFFICE(Office_code, City, Phone, State, Country)
1. Implement the necessary SQL statements for creating the above tables with necessary primary key and
foreign key. (8)
2. Implement the necessary SQL statement to specify the constraints that (i) employee id should start with
either S or H and (ii) email address must have @ as one of the characters. (4)
3. Enter at least two rows interactively into each table and display the content of the tables. (4)
4. Implement SQL statement for the following queries.
(a) Display the employee detail whose name starts with an A. (3)
(b) Display information about all offices situated in United States of America. (3)
(c) Display information about all employees in alphabetic order of their name. (3)
School of Information Technology and Engineering
Department of Information Technology
B. Tech. (IT)
Database Management Systems (ITE1003)
Lab CAT I August 2019

Slot: L35+L36 Class Number: 2586 (SET C)


Duration: Eighty Minutes Maximum Marks: 25

Instructions: Take screen shots of create table statement, insert statement, data present in each table and
queries along with their output.

Consider the following relational database schema. The primary keys are underlined. The foreign key is
self-explanatory.
PRODUCT(Prod_code, Name, Description, Vendor_id)
VENDOR(Vendor_id, Name, Email, Address)
1. Implement the necessary SQL statements for creating the above tables with necessary primary key and
foreign key. (8)
2. Implement the necessary SQL statement to specify the constraints that (i) product code cannot be a
negative number and (ii) email column of vendor table cannot have duplicate values. (4)
3. Enter at least two rows interactively into each table and display the content of the tables. (4)
4. Implement SQL statement for the following queries.
(a) Display information about vendors located in Bengaluru. (3)
(b) Display the name, email and address of vendors in ascending order of vendor id. (3)
(c) Perform interactive update of vendor’s email for a particular vendor. (3)

Das könnte Ihnen auch gefallen