Bca Lab Practicle
Bca Lab Practicle
SET B
3. A. Create the following tables with the fields given below:
a. TEACHER (T_ID, Department, Year of Exp, Name)
b. SUBJECT PAPER (Sub_Paper_ID, T_ID, Title_of Paper, Programme, Semester)
B. Insert the following data into their respective tables
C. Delete duplicate row from the table.
D. Display the alternate row from table.
4. Retrieve the TName, and No_of_period of teachers who teach in “ABC” school using Relational Algebra. (5)
TEACHER (TID, TName, TAddress, TQualification)
SCHOOL (SID, SName, SAddress, SPhone)
SCHOOL_TEACHER (SID, TID, No_of Period).
SET C
SET D
7. A. Create the following tables with the fields given below:
PRODUCT (Product_ID, Supplier ID, Proudct_Nanie, Category, Price, QuantityAvailable)
SUPPLIER (Supplier ID, Name, Area, City)
B. Insert the following data into their respective tables for the tables designed above.
C. Answer the following queries using SQL using above table:
(a) List price and product name of all the products whose Quantity- available is more than 100.
(b) Display product name and category of all the product whose price is more than Rs. 1,000 C.
10. Consider the following employee database, where primary keys are underlined. [5]
employee (employee-name, street, city)
works (employee-name, company-name, salary)
company (company-name, manager-name)
manages (employee-name, manager-name)
Give an expression in SQL for each of the following queries.
a) Find the names of all employees who work for Second Bank Corporation.
b) Find the names, street and cities of residence of all employees who work for Second Bank
Corporation.