You are on page 1of 8

Sessional TestI

Semester I11

Roll No: Total Number of pages: 04


Date: Time: 90 minutes
Department: CSE Max marks: 30
Title of the Course: Database Management System
Course Code: CS116

Section Type Serial number of Number of Each question Attempt


questions questions carries marks
A MCQ 1-8 8 0.5 All
B MCQ 9-11 All
Subjective 12 14 2 out of 3
MCQ 15-16 Al
Subjective 17-19 2 out of 3
D Subjective 20-22 2 out of 3

Section-AA
(Each question carries 0.5 mark)
(Out of questions 1- 8, all are to be attempted)

1. Which of the following is the full form of DDL?


a. Data Definition Language
b. Data Derivation Language
c. Dynamic Data Language
d. Detailed Data Language

2. What is a database?
a. Organized collection of information that cannot be accessed, updated, and
managed
b. Collection of data or information without organizing
C. Organized collection of data or information that can be accessed, updated, and
managed
d. Organized collection of data that cannot be updated

3. Which type of data can be stored in the database?


a. Image oriented data
b. Text, files containing data
C. Data in the form of audio or video
d. All of the above

4. Who created the first DBMS?


a. Edgar Frank Codd
b. Charles Bachman

Page 1 of 4
c. Charles Babbage
d. Sharon B. Codd

which is the lowest level of abstraction that describes how the data are actually
stored?
a. Physical
b. Abstract
C. View
d. User

6. Which of the following describes the database most appropriately?


a. Organized collection of information that cannot be accessed, updated, and
managed
b. Collection of data information without
or
organizing
C. Organized collection of data or information that can be accessed, updated,
and managed
d. Organized collection of data that cannot be updated
7. is a set of one or more attributes taken collectively to uniquely identify
a record.
a. Primary Key
b. Foreign key
c. Super key
d. Candidate key

8. In ER model, a multi valued attribute is represented using:


a. Ellipse
b. Double diamond
C. Double rectangle
d. Double ellipse

Section B
(Each question carries 2 marks)
(Questions 9- 11 are compulsory; multiple options can be correct)
(Out ofquestions 12-14, only 2 are to be attempted)

9. The following conditions must be met by a union operation.


a. There must be a common attribute between A and B.
b. A duplicate tuple is automatically discarded.
C. Include all the attributes from A and B.
d. Both A and B
10. Which one ofthe following given statements possibly contains the error?
a. select* from emp where empid = 10003;
b. select empid from emp where empid = 10006;
C. select empid from emp;
d. select empid where empid = 1009 and Lastname = '"GELLER';

Page 2 of 4
11. Consider the
following table named student
Roll Number Name Age Date of birth

A 18 13-12-2004

2 B 19 15-06-2003

If we alter this able using the following command what will be the resultant of the
same
Alter table student add phonenumber number(10,0) is not null;
a. Phone number column datatype modified.
b. phonenumber column ls added into the table
C. phonenumber column added and default value added into it.
d. Error occured

12. Draw the Network database of the Company named Google (EID, ENAME, Dept,
Project). The company has various departments (DNo. DName, EID) and department
ocated at diferent locations based on the employees (EID, EName, age, Salary)
and the Projects. Dlocation (DNo, DName, EID, Loc) and Project (PID, PName, Dept,
EID, Loc)

13. Explain Data independence and how it is achieved in DBMS. Elaborate the discussion
of phases contributing with a proper example using any database.

14. Explain the importance of Relational Algebra. Using two Relations (R1 and R2)
explain the cross product operation in Relational algebra (take use of minimum three
attributes per relation to justify the example).

Section-C
(Each question carries 1 mark)
(Questions 15-16 are compulsory; multiple options can be correct)
(Each question carries 2 marks)
(Out of questions 17-19, only 2 is to be attempted)

15. What is the output of the following


Select from tab where tname not like "%$%'
a. Prints all user created tables
b. Prints all user created tables and synonyms
c.Prints all the structural tableincludingsystem tables
d. Error in query.

16. Consider E1 and E2 are two entities and R1, R2 are two relationships between E1
and E2. R1 is one to many and R2 is many to many. R1 and R2 do not have any attribute
their own. Given the basic ER and relational models, which of the following is
INCORRECT?

Page 3 of 4
An attribute of an entity can have more than one value
b. An attribute of an entity can be composite
C. In a row of a relational table, an attribute can have more than one value
d. In a row of a relational table, an attribute can have exactly one value or a
NULL value

17. Illustrate referential


integrity by taking suitable example.
18. Define Keys and its importance in DBMS. Differentiate between Primary and
Candidate Key.
19. Consider the database for a banking enterprise. Write the queries for the below questions
Insert at least 5 tuples in each table
a. Display the branch details
b. List the customers of 'Mumbai' city
c. List the male customers of Kolkata'
city
d. List the state having more ihan one branch.

Section D
(Each question carries 5 marks)
(Out of questions 20-22, only 2 are to be attempted)
20. What is ER-diagram with strong and weak entity?
an

Consider the ER diagram below and convert into Relational Model. Calculate the Minimum
number of tables required.

(M2)
M1 M3
(P2) N1N2

M R1 P R2 N

21. Consider the following data for the Table.


EMPNO NOT NULL NUMBER(4). ENAME VARCHAR2(10), JOB VARCHAR2(9).
MGR NUMBER(4). HIREDATE DATE, SAL NUMBER(7,2), COMM NUMBER(7.2)
DEPTNO NUMBER(3). AGE NUMBER(3). ESAL NUMBER(10)
a. List minimum, maximum., average salaries of employe.
b. What is the difference between maximum and minimum salaries of employees in the
organization?
C. Display all employee names and salary whose salary is greater than minimum salary
of the company and job title starts with 'M.
d. Display total salary spent for each job category.
e. Display lowest paid employee details under each manager.
22. The use of Database languages and how many types of database languages are? Explain
the languages with proper commands of each language.

Page 4 of4
CHITKARA
UNIVERSITY
2022-2023

Sessional Test I1-August, 2022


Semester 3
Roll No: ll.01RIMLS
Total No. of Pages: 04)
Programme: B.E (CSE)
Time: 90 minutes
Course Title: Database
Management System Max. Marks: 30
Course Code: CS116

General Instructions:
Follow the instructions given in each section.
Do not write anything on the question paper, except your roll no.
Make sure that you attempt the questions in order.

Section Type Serial number of Number of Each question Attempt


questions questions carries marks
A MCQ 1-8 8 0.5 All
MCQ 9-11 All
8
Subjective 12-14 2 out of 3
MCCQ 15-16 All
C
Subjective 17-1 2 2 out of 3
D Subjective 20-22 5 2 out of3

Section A
(Each question carries 0.5 mark)
(Out of questions 1-8, all are to be attempted)

Q1. A sub query is an SQL expression that is placed another SQL statement.
a) After b) Before c) Outside d) Inside
02. In the normal form, a composite attribute is converted to individual attributes.
a) First b) Second c) Third d) Fourth

Q3. Functional Dependencies are the types of constraints that are based on_
a) Key b) Key revisited c) Superset key d) None of the mentioned

Q4. Which forms simplifies and ensures that there are minimal data aggregates and repetitive
groups:
a) 1NF b) 2NF c) 3NF d) All of the mentioned

Q5. The three rules (Reflexitivity, Transitivity and Augmentation) are used to find logically
implied functional dependencies. This collection of rules is called
a) Axioms b) Armstrong's axioms c)Armstrong d) Closure

1
are there
?
constraints
d) 5
of integrity
Q6. How many types c)3 operation.
b) 4
a) 2 memory
with the,
in main
a buffer
database and stored in
the d) Commit
Q7. X is read from
c) Rollback
b) Read the
a) Write materialized view, using
on the
can be tested easily
h e unctional dependency
Q8.

constraints and Unique


c)Unique
d) Both Null
b) Null
a) Primary key

Section-B
(Each question carries 2 marks)
options can be correct)
(Questions 9-11 are compulsory; multiple
are to be attempted)
(Out of questions 12-14, only 2

Q9. Consider following schedule:

R,(X); R(X); W»(X); R«(X); W: (X)

To which of following serial schedule it is equivalent?


b) No conflict serializabiity
a) Ta, Ts, T
c) T T, Ts d) T, T2, Ti

Q10. Consider a relation R (A,B,C,D) having conditions of (A,B)*-> C,D; A - >C is a example

of
a) Fully Functional Dependency b) Partial Dependency
c) Multivalued Dependency d) Transitive Dependency

a11. Consider there are three transactions with 2, 3, 4 operations respectively, What would be
the total number of serial schedules?
a)9 b) 6 c)1260 d) 1254

Q12. Explain the functional dependency property of pseduotransitivity and transitivity with
proper example.

Q13. In the following relation find the multi-valued dependency and convert the relation into
4NF.

Serial No University Hobby


111 CU, Punjab Tennis

111 CU, HP Badminton


111 CU, Punjab Badminton
111 CU, HP Tennis

2
Q14. Ihe relation R{ABCD) and the
of the given relation
FD: (AB-2C. BC2D) are given. Check the highest normai form
R.

Section C
Each question carries 1 mark)
(Questions 15-16 are compulsory; multiple options can be correct)
(Each question carries 2 marks)
(Out of questions 17-19, only 2 are to be attempted)

Q15. Information is maintained by Integrity Constraints.


a) Data b) Quality
c) Flow d) Quantity

Q16. Which of the following ACID property is maintained by concurrency control component
a) Atomicity b)Duration
c) Isolation d) Consistency

Q17. Classify and explain schedules on the bases of serializability.

Q18. Student is a table having attributes (SID, Sname, Age, City, Subject, Marks).

STUDENT

SID SNAME AGE CITY SUBJECT MARKS


Atul Khanna 19 Delhi DBMS 80
SamirSharma 21 Chandigarh DS 75

Priti Singh 19 Mohali DBMS 93


4 Niharika Singh 19 Rajpura DBMS 63
Nitin Saxena 20 Ambala TOC 62
Paras 20 Rajpura DBMS 85

Write a nested query in SQL to give grace marks of 10 to each student who is from 'Rajpura'
and display the name of the student who got highest marks after updating the Student
table.

Q19. Elaborate lossless decomposition in normalization with the help of suitable


example.

Section DD
(Each question carries 5 marks)
(Out of questions 20-22, only 2 are to be attempted)
Q20. lustrate the concept of transaction and also discuss the different
states of transactions.

3
Q21. Consider the CUSTOMERS table having the following record:
- - . +---.
+--- .---+-----+
ID NAME AGEI ADDRESS I SALARY
+---
. Ramesh 32 I Ahmedabad | 2000.00
2 Khilan 2 5 I Delhi 1500.00
3Ikaushik 23 Kota 2000.00I
4 Chaitali I 25 Mumbai 6500.00 |
5 Hardik 27 I Bhopal 8500.00 1
6 Komal 22 MP 4500.00
7 Muffy 24I Indore 10000.00 I
-+----. -+--.
---4---------+
A the given table delete those records which have age

a Write the query for the delete those records which have age = 25 and then COMMIT the
changes in the database. Reflect the changes through the table also(draw the table with
data.
b) Write a SQL query to delete the tuple with ID=3 and use the savepoint for this transaction.
now update the Name= Ram' corresponding to ID=1 and again set a savepoint for
Similarly
this transaction.

Q22.Compute the closure of the following set F of functional dependencies for relation schema
R (A, B, C, D, E, F).

CF
E>A
EC D
AB

List the candidate keys for R. And also determine the total number of candidate
keys and
super keys.

You might also like