You are on page 1of 3

Birla Institute of Technology & Science, Pilani

Work Integrated Learning Programmes Division


M. Tech. Software Engineering at Wipro Technologies (WASE)
Second Semester 2018 - 2019
Mid-Semester Test (MAKEUP)
Course Number : SEWPZC337
Course Title : DATABASE SYSTEMS AND APPLICATIONS
Type of Exam : Closed Book No. of Pages: 3
Weightage : 30 % No. of Questions: 9
Duration : 90 minutes
Date of Exam : 21st June,2019 Session: FN( 9 to 10.30 AM)
SECTION A (5 x 2 = 10 Marks)
Q1). Write a Query in SQL to find Ids of all professors who taught at least two courses in the same
semester using self join.
Q2).Write its equivalent Relational Algebra Operation.
Q3).Emp(eid: integer, ename: string, age: integer, salary: real)
Works(eid: integer, did: integer, pct_time: integer)
Dept(did: integer, dname: string, budget: real, managerid: integer)

Write an SQL query to find the managerids of managers who control the largest amounts.
Q4).What is normalization? Explain its significance.
Q5).Consider the following scenario, where you designed an ER diagram for a university database.
Write SQL statements to create the corresponding relations and capture as many of the constraints as
possible.

semesteri
ssn d

Teache
Professor Course
s

SECTION B

Q6). The academic world is an interesting example of international cooperation and exchange. This
problem is concerned with modeling of a database that contains information on researchers, academic
institutions, and collaborations among researchers. A researcher can either be employed as a professor or
a lab assistant. There are three kinds of professors: Assistant, associate, and full professors. The
following should be stored:
• For each researcher, his/her name, year of birth, and current position (if any).
• For each institution, its name, country, and inauguration year.
• For each institution, the names of its schools (e.g. School of Law, School of Business, School of
Computer Science,. . . ). A school belongs to exactly one institution.
• An employment history, including information on all employments (start and end date, position, and
what school).
• Information about co-authorships, i.e., which researchers have co-authored a research paper. The
titles of common research papers should also be stored.
• For each researcher, information on his/her highest degree (BSc, MSc or PhD), including who was
the main supervisor, and at what school.
• For each professor, information on what research projects (title, start date, and end date) he/she is
involved in, and the total amount of grant money for which he/she was the main applicant.

Draw an E/R diagram for the data set described above. Make sure to indicate all cardinality constraints
specified above. The E/R diagram should not contain redundant entity sets, relationships, or attributes.
Also, use relationships whenever appropriate. If you need to make any assumptions, include them in
your answer. 6M

Q7).Let the following relation schemas be given: R = (A, B, C) S = (D, E, F) Let relations r(R) and s(S)
be given. Give equivalent SQL statements for the following queries. 4M
(i) ΠA(r)
(ii) σB=33(r)
(iii) rXs
(iv) ΠA,F (σC=D(r X s))

Q8).Schema for Student Registration System

Student (Id, Name, Addr, Status)


Professor (Id, Name, DeptId)
Course (DeptId, CrsCode, CrsName, Descr)
Transcript (StudId, CrsCode, Semester, Grade)
Teaching (ProfId, CrsCode, Semester)
Department (DeptId, Name)
a. Write an relational algebra query to display the name of courses offered by “CS”
department(“CS” deptId) 1M
b. Write a relation algebra query to display name of the courses taught in “6sem” 2M
c.Find Ids of all professors who taught at least two courses in the same semester. 2M

Q9) The illustrative examples used in this paper are based on the following database of suppliers,
parts, projects, and shipments:
SUPPLIER @NO, SNAME, SLOC, SBUDGET)
PART (PNO, PNAME, DIM, PRICE, COLOR)
PROJECT (JNO, JNAME, PNO, JBUDGET, JLOC)
SHIPMENT (SNO, PNO, JNO, QTY)
(d) Find the supplier numbers of suppliers which supply parts whose part number is the
highest of those parts whose unit price is greater than 25. 1M
(e) Find the supplier numbers of suppliers which supply projects that are located in New York
and whose project numbers are the same as the supplier numbers. 1M
(f) Find the names of suppliers who supply all red parts that are priced higher than 25.
2M
XXXXXX

You might also like