Professional Documents
Culture Documents
DBMS Pyqs
DBMS Pyqs
Q2. a) Describe DBMS Architecture with diagram. How this architecture helps to achieve Data
Independence? (7 Marks)
• A college is organized into departments. Each Faculty works for a department. Each department
has a unique name and a unique number.
• A department controls number of courses it offers. Each course has a unique name, unique
number
and duration.
• We store each Faculty's name, Faculty ID, address (city, state), salary, gender, birthdate, age and
multiple contact numbers.
• A faculty is assigned to one department but may teach several courses.
• We also keep the track of the ckpenclents of each faculty for insurance purposes. We keep each
dependent's first name, gender, birthdate and relationship to the faculty.
Also list out the Strong entity types in the above ER diagram. Is there a weak entity type? If
so, give its name and partial key.
l
1
J
ti
Q-4 a) The schema for the following tables are as follows: (7 Marks)
EMPLOYEE
ENO EMP NAME DESIGNATION DATE ·oF JOINING EARNINGS DEP1NO
DEPARTMENT
! DEP'I'NO I DNAME
Write down the SQL Statement for the following:
i. Create the above two tables with appropriate data types and constraints.
ii. Insert l record to each of the above tables with appropriate data.
iii. Find employee names who are working in deptno 30, order by earnings in descending order.
iv. Find out the total earnings of all the employees.
v. Find out the name of the employee having maximum earning in each dept.
vi. Add a new column location varchar ( 10) to the table Department.
vii. Insert one more record to the table Department
B) Consider the following database, Identify Super keys, Candidate keys, Primary key, and Alternate
keys. from the table. (3 Marks)
Rollno Name Age Mobile Email id
11 Mohit 18 9899999991 mohit@vips.edu
12 Suraj 17
..
9991113333 suraj@vips.edu
13 Ashish 18 9833336666 a@gmail.com
14 Riya 17 9999999111 r@yahoo.com
15 Suraj 19 8811182334 s@gmail.com
16 Khushi 18 8812345672 khushi@vips.edu
(
i !1
,
..)
'
)
. ) )'
\
'
I
2
' ( !
... •
{ I
> •'
- (
VIVEKANA NDA l~STITUT E OF PRCfFESSI ONAL STUDIES
CLASS TEST- February 2018
PART-I ....
Q l. Explain any 4 from the following: (2.5 X 4~10)
a) Single vs Multivalued Attribute
b) Role ofDBA (Database Administrator)
c) DDL and DML Commands
d) Aggregate functions in SQL
e) Database schema and Database slalt:
PART-2
Q2.
a) Explain ANSI/SPARK architecture of DBMS. How this architecture supports Data Independence. (5)
. b) Explain Primary key, Unique key, Candidate key, Super key and Foreign key with examples. (5)
Q3. a) What do you mean Integrity Constraints? Explain the different types of Integrity constraints while
designing the database. (4)
b) Consider the ER Diagram shown in given figure for part of BANK database. Each bank cs. :1ave
multiple branches and each branch can have multiple accounts and fo~:;. (6)
BANK ~===~i-E PN
8AANCHES >====== !
'r---ir-----.' I.!==== =~
1
J
Q4. a) Explain the characteristics of Database approach over File System approach. (5)
b) The stl1ema for the following tables is as follows: (5)
EMPLOYEE
empid empname age deptno designation salary
V
Count the total no of employees who belongs to the dept no 20.
Find out the maximum salary of all the employees who are working in dept no l 0.
./ 5. Add one more column address varchar (12) to the table EMPLOYEE.
2
PAST 5 YEARS QUESTIONS FROM UNIT I
2018
Ql. a) Discuss the advantages and disadvantages of DBMS. (6.5)
b) Why is relation database approach better than earlier methods? (6)
Q2. a) Construct an E-R diagram for a hospital management system with a set of
doctors and a set of patients. With. each patient, a series of various tests
and examinations are conducted. On the basis of preliminary report
patients are admitted to a particular specialty ward. (6)
b) Construct appropriate tables for the above E-R diagram (6.5)
Q3 a) Explain the differences ahiong external, internal and conceptual schemas. (4.5)
b) Related with database, explain the following terms (8)
2017
Q4. a) Write a short note on three schema architecture. (4.5)
b) Explain different types of Data Independence. (3)
c) Write a short note on the following: (5)
i. Primary Key
ii. Candidate key
iii. Super key
iv. in Derived attribute
v. Multivalued attribute
Q5 (a) Explain the term Generalization and Specialization with suitable example. (4)
(b) Suppose you have a table for a dance studio. The attributes are
dancer's identification number, dancer's name, dancer's address,
dancer's telephone number, class identification number, day that the
class meets, time that the class meets, instructor name, ·and
instructor identification number. Assume that each dancer takes one
class, each meets only once a week and has one instructor and each
instructor can teach more than one class. Dancer (Dancer ID
Dancer Name, Dancer Address, Dancer Phone, Class ID, Class Day,
Class Time, Instructor Name, Instructor ID) Draw an entity
relationship diagram (ERO) for this database. (8.5)
-
Unit-IT (2015)
Q.4
a) W ha t is th e purp
ose of integrity cons
b) W ha t is the diff tram:ts in SQL?
erence between W
c) Differentiate be H ER E and HAVING cl
tween outer and in ause?
ner jo in operations
Q.5 ? •
a) Define BCNF.
How it is differen
example of a relatio t from 3NF? Pres
n in 3NF that is no ent an
b) A table R ha t in BCNF.
s attributes A,B,C
following functiona ,D,E and satisfie
l dependencies. s the
A -> B C
B -> D
C D -> E
E -> A
i. W ha t are the cand
idate key?
ii. Is this table in 2N
F/3NF/ BCNF?
Unit-Il(2017)
Q.4
d) Explain th e SQ
L operators BETW
N U L L by taking su EEN,AND, IN,LIK
itable examples. E and IS
e) Discuss various
data types availabl
f) SQL allows at e in SQL.
tributes to have a
called th e null valu sp ecial value NULL
e. What are the thre which is
th at ca n be pu t on e common interpre
null value? tations
Q.5
c) What is weak
entity set? What ar
of w ea k entity sets e the two principles
? Give suitable exam source
d) W ha t do you unde ples to explain.
rstand by referent
an d attribute-based ial integrity constra
check constraints? int
(2018)
Q.4
g) Explain th e
difference betwee
conceptual schemas n external ,inte
. rnal and
h) Related with th
e database explain
i. D at a integrity the ~~llowin.g term
ii. Concurrency s:
iv.Refrential integr 111.Data mdependen
ity. cy
2015
Q6. Draw an ER diagram for
The Book Club. It has me
books are sold. The qoo mbers to whom the
ks are made available at
city-called Book Club Ch different places in the
apter-to make it easy to
are identifies by a book members. The books
id, the author and the pu
write more than one bo blisher. An author can
ok and a book can have
Members have informati mo re than one author.
on such as Membership
status. A member can pla id, Name, Phone# and
ce more than one order.
attributes for the schem Ch oose additional
a that seems appropriate
assumptions you make. . Me ntion any
Show minimum and ma
based on the assumptio xim um cardinality ratios
ns.
(12.5)
Q7
(12.5)
Consider the following
MAILORDER relational sch
data for a mail order com ema describing the
pany.
PARTS(Pno, Pname, Qo
h, Price, Olevel)
CUSTOMERS(Cno, Cnam
e, Street, Zip, Phone)
EMPLOYEES(Eno, Enam
e, Zip, HireDate)
ZIP CODES{Zip, city)
ORDERS(Ono, Cno, Eno,
received, Shipped)
DETAILS(On, No Qty)
The attribute names are
self-explanatory:Qoh sta
hand. Specify the follow nds for quantity on
ing queries using Relati
(a) List the name of parts ona l Algebra:
that costs less than Rs.
(b) List the name and citi 200
es of employees who hav
costing more than Rs.SQ e taken orders for parts
Q
(c) List the name of cus
tomers who have ordere
living in Mumbai d parts from employees
(d) List the name of cus
tomers who ha"'.e placed
exactly two orders.
2014
Q8 (a) Explain data indepen
dence. What is the differe
independence nce between logical and
Physical data
(b) Define database ma
nagement system. What {6.5)
are the advantages of a
DBMS? (6)
Q9
(a) What are various typ
es of attributes? Explain
Also Draw the diagram. with an example.
(b) What is DDL and DM
L, explain with an examp (6.5)
le.
(6)
i) SQL allows attributes to have
a special value NULL which is
called the null value. What are the
three common interpretations
that can be put on null value?
Q.5
e) Consider the following relation
al schemas:
Emp (empno, ename, job, sal, com
m., hiredate, deptno)
Dept (deptno, dname, location)
COURSE: BCA
SEMESTER: 11
SUBJECT: Database Management System M.MARKS: 20
PAPER CODE: 110 DU RATION: I Hour
NOTE: Question no. 1 is compulso1)'. Attempt any une from the rest. •
QI a) What do you mean by Database Management System? What are the advantages of using
Database Management System? (S)
b) What is data independence? Explain the different types of data independence with example. (S)
Q2a) What is an ER Model? Explain the various 1~ pes of attributes involved in ER Modelling with,
example. • (S)
b) 1:,xplain the difference between the following with example: (S)
i) Data Definition Language & Data Man.pulation Language.
ii) Database Schema and Database State.
STUDENT
b) Explain the various da_ta types used in SOL with example. (3)
PROFESSIONAL STUDIES
VIVEKANANDA INSTITUTE OF
5
FIRST CLASS TEST - MARCH 201
COURSE: BCA
SEMSTER: II Sem
em M.MARKS: 30
SUBJECT: Database Management Syst
PAPER.CODE: 110 DURATION: I Hour 30 Minutes
ram. (5)
Q3. a) Discuss the 3-TIER /ANSI-S
PARC architecture of DBMS with diag
(5)
d:
b) Explain the following SQL comman v) Delete
iii) Insert iv) Update
i) Create ii) Alter
(7)
table is as:
Q4 a) The schema for the STUDENT
/ Rollno / Name / Subject / Grade / Marks
wing:
Write the SQL Statement for the follo
whose name starts with 'M' .
I. Find out the details of all students
enrolled with grade 'A+'.
2. Display the total number of students •
Roll no is I03.
3. Update the marks with 85 where orde r of nam e.
end ing
4. Arrange the whole table by the desc ENT
student table.
5. List distinct subject name from the char (12) to the table STUD •
6. Add one more column address var
iate value.
7. Insert a new record with the appropr
(3)
I -
VIVEKANANDA INSTITUTE OF FROFESSJONAL STUDIES
SECOND CLASS TEST - APRIL 2015
COURSE: BCA
SEMESTER; II
SUBJECT: Database Management System M.MARKS: 30
PAPER CODE: BCAll0 TIME; 1 Hour 30 Minutes
Ql.
a) What is Normaliz.ation? Explain INF and 2NF by suitable example. (6)
b) Explain various Relational Cons_traints by giving suitable examples. (4)
Q2.
a) Write the s1eps to convert the basic ER model-to relational database schema using a suitable
example. (6)
b) Define Foreign Key and Candidate Key with examples. (4)
(b) Explain Equi Join ~nd Full Outer Join in Structured Query Language. (4)
VIVEKANANDA INSTITUTE OF PROFESSIONAL STUDJES
CLASS TEST - February 2016
COURSE: BCA SEMESTER: 11
SUBJECT: Database Management System M.MARKS: 30
PAPER CODE: 110 TIMI::: I Hour 30 Minutt.•s
The Company is organized into DEPARTMENTs. Each department has unique id and name and a particular
employee who manages the department. Start date for the manager is recorded. Department may have several
locations. A department controls a number of PROJECTs. Projects have a unique number,. name and a single
!~,cation. Company's EMPLOYEE s n11me, ssno, address, salary, sex and birth date are recorded. An emp~ee is
assigned to one·department, but may work for several ;::-ojc:ct s (not nece:,sarily controlled by her dept)jMimber o1\·
hours/week an employee works on each project is recorded. We keep the track of direct supel)f1sor of each
employee. Employee's DEPENDENT s are also tracked for health insurance purposes (dependent neme, birthdate,
relationship to employee).
State all the assumptio1~for the missing data and attrib11tes considered. Draw an E-R diagram for the same.
.
6. Change the street of employee 'Avi' to '17 Block, Delhi'. \..::!J
7. Insert a new employee assuming your own data.
l
FESSIONAL STUDIES
VIVEKANANDA INSTITUTE OF PRO
CH , 2020
INTERNAL EXAMINATION -M AR
SEMESTER: II
COURSE: BCA
M.MARKS: 30
System
SUBJECT: Database Man age men t
TIME: 1 Hour 30 Minutes
PAPER CODE: BCA-110
· SECTION B
used in the architecture
of DBMS in detail. Exp!ain each term
Q2. a) Discuss three schema architecture (1 marks)
uiagram . Wri t~ its ad.v .aota ~es.
of Data Independence tha t could
pendence? Explain diffe rent types
b) What do you mean-by Data Inde (3 marks)
be achieved in DBMS.
the games they play, and the
lication that models soccer teams,
Q3. a) Assume we have the following app (7 marks)
each team . In the desi gn, we wan t to capture the following:
players in
n stadium, and name of the
e a set of team s, each team has an ID (unique identifier), name, mai
We hav
• Each team has man y play ers, and each player belongs to one
team. Each player has a num ber
t year, an_d shir t num ber tha t he uses
(unique identifier), name, DoB, star . The match takes place in
play mat che s, in each mat ch ther e is a host team and a guest team
• Teams
the stadium of the host team iden tifie r), name,
has exa ctly thre e refe rees . For each referee we have an ID (unique
• Each match r two are assistant referee
ree is the main referee and the othe
0oB, years of ~xperience. One refe h the game is played, the
k of the follo ~ing : - The date on whic
• For each match we need to keep trac .l
mat ch and the play ers participate"d in the match ·:,,-, r •
final resu lt of the • • • "
State any asl~mptions you have thlt
aff e~
,besign an ER diagram \J capture the. above r~~ tire ~~n ts.
d. -$
and primary keys are clearly men titne
your design. Make sure cardinalities
STUDENT
COURSE •
Column Name Constraint
COURSE NUM Primary Key
CNAME Not null
b) What are joins in SQL? Differentiate between Inner Join and Outer Join with examples.
(3 Marks)
..
..
' .. t
,.
.. ,?.f.
.,
·,
3/!,'
_,,.;.