0% found this document useful (0 votes)
40 views

2021 DBMS Mid

The document contains a sample question format for a database management systems exam covering topics like data models, database systems, ER modeling, relational algebra, and SQL. It includes 20 multiple choice questions divided into 5 sections testing comprehension of concepts and skills across 4 learning outcomes.

Uploaded by

santos.kiit1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views

2021 DBMS Mid

The document contains a sample question format for a database management systems exam covering topics like data models, database systems, ER modeling, relational algebra, and SQL. It includes 20 multiple choice questions divided into 5 sections testing comprehension of concepts and skills across 4 learning outcomes.

Uploaded by

santos.kiit1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Sample Question Format

KIIT Deemed to be University


Online Mid Semester Examination(Spring Semester-2021)

Subject Name & Code: DBMS & CS-2004


Applicable to Courses: B.Tech CSE, IT, CSSE and ESCE

Full Marks=20 Time:1 Hour

SECTION-A(Answer All Questions. All questions carry 2 Marks)

Time:20 Minutes (5×2=10 Marks)

Questio Question Question Answe CO


n No Type(MC r Mappi
Q/SAT) Key(if ng
MCQ)
Q.No:1( ___________ information is not provided CO1
a) by data dictionary.
A.Where data is located
B.Who owns or is responsible for the data
C.How the data is used
D.The size of the disk storage
Which is correct about data models? CO1
I. Hierarchical model is more complex in
structure than network model.
II. Semantic content is added in relational
model.
III. ER model is widely used data
model but it limits constraint
representation.
IV. Relational model visual
representation in more efficient than
ER model.
A. I
B. II
C. III
D. IV
Which is wrong about single user database CO1
system?
I. It supports only one user at a time.
II. It is also called a desktop database
system.
III. It supports only one user all time.
A.I
B.II
C.III
D.ALL
Which is more correct? CO1
I. Semantics are added in ER model.
II. DML is added in ER model.
III. DDL is added in ER model.
A. I
B. II
C. III
D. ALL

Q.No:1( Let E1 and E2 be two entities in an ER CO2


b) diagram with simple single-valued
attributes. R1 and R2 are two relationships
between E1 and E2, where R1 is
many-to-many and R2 is many-to-many. R1
and R2 do not have any attributes of their
own. What is the minimum number of
tables required to represent this situation in
the relational model.
A. 2
B. 3
C. 4
D. 5
Which one of the following option is CO2
CORRECT consider the following
statements.

(i) An attribute of an entity can be


composite in ER model
(ii) In a row of a relational table, an
attribute can have exactly one value or a
NULL value

(A) i
(B) ii
(C) Both
(D) None
The rule which guarantees that every CO2
primary key attribute is NOT NULL?
A.Entity Integrity
B.Domain Constraint
C.Referential Integrity
D.Operational Constraint
In a university database, every faculty must CO2
have to teach at least one course. However,
a course can be taught by only one faculty.
Again, there may be some courses for which
no faculty has been allotted. Which one of
the following correctly represents the
cardinality and participation for the
relationship between faculty and course?
A. 1:1, total, partial
B. 1:1, partial, partial
C. 1:M, partial, total
D. 1:M, total, partial
Q.No:1( Select the relational expression which could CO3
c) possibly return the following result from a
relation R:
a c
1 2
2 3

(a) Пa,c (σa=c(R))


(b) Пa<c (σa,c (R))
(c) Пa>2 (R)
(d) σa<c (Пa,c (R))

Which of the following is wrong? CO3


I. In the inner join, tuples with NULL
valued join attributes appear in the
result.
II. The equi join is not the theta join based
on equality of specified columns.
III. Outer join is not an extension of the
natural join operation.
A. I
B. II
C. III
D. ALL

Given the relations CO3

Students(Name, Marks, SchoolNo)


Schools (SchoolNo, SchoolName, Address)

Which of the following queries cannot be


expressed using the basic relational algebra
operations (σ, π, ×, ∪, −) ?

(A) School Address of every student


(B) Students whose name is same as
their school name
(C) The sum of all students’ marks
(D) Name of students of a given school

Which among the following is correct? CO3


I. Union operation is used to combine
data of attribute of a relation.
II. Division operation is the reverse of the
Cartesian product operation.
III. Difference operation is used to identify
the rows that common to both
relations.
A. I
B. II
C. III
D. None
Q.No:1( For a weak entity set to be meaningful, it CO2
d) must be part of a which type of relationship
A.One-to-one relationship
B.Many-to-many relationship
C.One-to-many relationship
D.None of these
Which is correct? CO2
I. All the super keys are candidate
keys.
II. All the candidate keys are super
keys.
III. Primary key is called as alternate
key.
IV. All candidate keys are primary
keys.
A. I
B. II
C. III
D. IV
Which is incorrect? CO2
I. There is no confusion between
entity set and attributes while
designing ER model.
II. There is no confusion of
relationship type while designing
ER model.
A. I
B. II
C. BOTH
D. NONE
How many relational schemas you need to CO2
represent the following ERD.

A. 2
B. 3.
C. 4
D. 5
Q.No:1( What will be the output if the following is CO3
e) executed?
Select * from customer where name like
‘%K%’
A. Display the details of only the customers
whose name starts with ‘K’.
B. Display the details of only the customers
whose name ends with ‘K’.
C. Display the details of the customers
whose name consists of ‘K’ at any position.
D. All of the above.

Consider two tables named as ‘Product’ and CO3


‘Order_items’. Which one of the following
statements correctly represents the
referential integrity constraint that is
implemented at table level?
A. CREATE TABLE order_items(order_id
number(5) PRIMARY KEY, pid number(5)
REFERENCES product(product_id),
product_name char(20), supplier_name
char(20), unit_price number(10));

B. CREATE TABLE order_items (order_id


number(5) PRIMARY KEY, pid number(5)
REFERENCES product, product_name
char(20), supplier_name char(20),
unit_price number(10));

C. CREATE TABLE order_items( order_id


number(5) CONSTRAINT od_id_pk
PRIMARY KEY, product_id number(5)
CONSTRAINT pd_id_fk REFERENCES
product(product_id), product_name
char(20), supplier_name char(20),
unit_price number(10));

D. CREATE TABLE order_items( order_id


number(5) , product_id number(5),
product_name char(20), supplier_name
char(20), unit_price
number(10)CONSTRAINT od_id_pk
PRIMARY KEY(order_id),CONSTRAINT
pd_id_fk FOREIGN KEY(product_id)
REFERENCES product(product_id));
Consider the following 3 statements for CO3
SQL query.

(i) An SQL query automatically


eliminates duplicates
(ii) All attributes used in the GROUP
BY clause may appear in the
SELECT clause
(iii) SQL permits attribute names to be
repeated in the same relation

Which one of the following option is


CORRECT?
(A) i
(B) ii
(C) iii
(D) All of the above
Consider the following two relational CO3
schemas and find out the right relational
algebra expression that lists all manager’s
first name.
Employee(id, f_name, l_name, dob, salary,
dept_no)
Department(dept_no, dept_name,
dept_location, manager’s_id)
A.Πf_name(σemployee.dept_no =
department.dept_no(employee ×
department))
B.Πf_name(σid=manager’s_id(employee ×
department))
C.Π manager’s_f_name(employee ×
department)
D.
Πid,f_name(employee)‚Πmanager’s_id(depar
tment)
SECTION-B(Answer Any One Question. Each Question carries 10 Marks)

Time: 30 Minutes (1×10=10 Marks)

Question No Question CO
Mapping
Q.No:2 A. Assume there are different IPL cricket teams, CO2
having players in each team. In the ER design, we
want to show the following:
There are a set of teams, each team has an ID (unique
identifier), name stadium_name, and to which city
this team belongs.
Each team has many players, and each player belongs
to one team. Each player has a number (unique
identifier), player_name, DoB, age(as derived
attribute) start year, and shirt number that he uses.
Teams play matches, in each match there is a host
team and a guest team. The match takes place in the
stadium of the host team.
For each match we need to keep track of the
following:
 The date on which the game is played
 The final result of the match
 The players participated in the match.
 For each player, how many runs he scored,
whether or not he took any wicket
 During the match, one player may substitute
another player. We want to capture this
substitution and the time at which it took
place.
 Each match has exactly three umpires
(umpire can either be a bowler’s end umpire,
square leg umpire, third umpire). For each
umpair we have an ID (unique identifier),
name, contact number (as multi-valued
attribute) DoB, years of experience.

Design an ER diagram to capture the above


requirements. State any assumptions you have that
affect your design. Clearly specify the cardinalities and
primary keys. [5 marks]

B. Map the ERD in above question to create the


relational model. (Indicate primary keys as well as
referential integrity constraint). [3 marks]

C. Why are entity integrity and referential integrity


important in a database? [2 marks]

Q.No:3 A. Consider a database that consists of the following CO3


relations.
SUPPLIER(Sno, Sname)
PART(Pno, Pname)
PROJECT(Jno, Jname)
SUPPLY(Sno, Pno, Jno)
The database records information about suppliers,
parts, and projects and includes a ternary relationship
between suppliers, parts, and projects. This relationship
is a many-many-many relationship. Write the following
queries using the relational algebra.
a. Find the name of the supplier who in involved in
project number ‘1’.
b. Find the detail of the supplier who supplies part
number ‘2’.
c. Obtain the details of supplier working on the
‘smart-home’ project.
d. d. Find the Sno who don’t work on project ’1’.
[1.5*4=6 marks]

B. What is the difference between specialization and


generalization? Why do we not display this difference
in schema diagrams? How the specializations and
generalizations will be affected if constraints are
applied. [4 marks]

Q.No:4 Students can take part in multiple sports. Each sport CO2
has minimum two coaches. One coach must be hired by
a certain department and must coach only one sport,
which may have many student-participants from
different departments. A department can hire multiple
coaches for multiple games. A department can enroll
maximum 120 students. A student must be enrolled to
one department only. Every student must have a first
name and a last name along with a unique roll number,
every coach must have a first name and a last name
along with a unique employee id, every department
should have a unique department name, and a sport
must have a unique sports_id.
A. Draw an ERD for the University Sports System
from the above description. Do not use any additional
entities; however, you can add proper attributes to
describe the entity sets. [5 Marks]

B. Represent your ERD of the above system in


relational schemas. [3 Marks]

C. Justify whether the redundancy of data can be


reduced with a foreign key or not. [2 mark]

Q.No:5 Consider a CONFERENCE_REVIEW database in CO2


which researchers submit their research papers for
consideration. Reviews by reviewers are recorded for
use in the paper selection process. The database system
caters primarily to reviewers who record answers to
evaluation questions for each paper they review and
make recommendations regarding whether to accept or
reject the paper. The data requirements are summarized
as follows:
■ Authors of papers are uniquely identified by e-mail
id. First and last names are also recorded.
■ Each paper is assigned a unique identifier by the
system and is described by a title, abstract, and the
name of the electronic file containing the paper.
■ A paper may have multiple authors, but one of the
authors is designated as the contact author.
■ Reviewers of papers are uniquely identified by
e-mail address. Each re-viewer’s first name, last name,
phone number, affiliation, and topics of interest are
also recorded.
■ Each paper is assigned between two and four
reviewers. A reviewer rates each paper assigned to him
or her on a scale of 1 to 10 in four categories: technical
merit, readability, originality, and relevance to the
conference. Finally, each reviewer provides an overall
recommendation regarding each paper.
■ Each review contains two types of written comments:
one to be seen by the review committee only and the
other as feedback to the author(s).
A. Design an entity–relationship diagram for the
CONFERENCE_REVIEW data-base.

B. Convert the ER model to relational schema.


C. Referential integrity always maintain the database
into a consistent state explain this concept with help of
a suitable example.

[6+2+2 marks]

Q.No:6 Consider the following relational database schema as CO3


mentioned below
EMPLOYEE(Emp_ID, Name, Dept_no, Age, Gender,
Job, Manager, Salary, City)
Write the following queries in SQL and relational
algebra.
a. Display the Emp_ID, Name, Salary, and
Manager for all male employees either work for
department number 10 or 20 and are getting
salary above 50000.

b. Display the details of the employees above


50yrs of age and they work under manager
‘5366’ or who belongs to ‘Delhi’.

c. Display the Emp_ID, Name, and job whose


name contains ‘A’ and Dept_no is 20.

d. Display the employee no of the employees who


are not managers.
e. Display the details of the employees who are
earning the second highest salary.

[2*5 marks]

Controller of Examinations

You might also like