CST204 QP
CST204 QP
CST204 QP
PART A
(Answer all questions; each question carries 3 marks) Marks
Module -1
11 a) Differentiate between two-tier and three-tier client-server database architecture 7
with the help of neat labelled diagrams.
Page 1 of 4
02000CST204052101
Page 2 of 4
02000CST204052101
Module -2
13 a) Consider the following schema, 8
Suppliers (sid , sname, address)
Parts (pid, pname, color)
Catalog (sid, pid, cost)
The primary key fields are underlined.
Write relational algebra expressions for the following queries:
b) Find the name of parts supplied by supplier with sid=105
ii) Find the names of suppliers supplying some green part for less than Rs 1000
iii) Find the IDs of suppliers who supply some red or green part
iv) Find the names of suppliers who supply some red part
b) Differentiate between the following SQL statements 6
b) DROP and DELETE
ii) ALTER and UPDATE
14 a) Write SQL DDL statements based on the following database schema (Assume 8
suitable domain types):
Employee (eid, name, designation, salary, comp_id)
Company (comp_id, cname, address, turnover)
b) Create the above mentioned tables assuming each company has many
employees. Mention the primary key, foreign key and not null
constraints.
ii) Insert values into both the tables. Mention in which order insertions will be
carried out.
ii) Modify the table Employee to include a new column “years_of_exp”
iv) Increment the salary of employees whose salary is less than Rs25000 by 5%
b) Illustrate any three ways of using INSERT statement in SQL. 6
Module -3
15 a) For the relation schema below, give an expression in SQL for each of the queries 8
that follows:
employee (ID, person_name, street, city)
works (ID, company_name, salary)
company ( company_name, city)
manages (ID, manager_id)
Page 3 of 4
02000CST204052101
Page 4 of 4