You are on page 1of 14

VIVEKANANDA INSTITUTE OF PROFESSIONAL STUDIES

~LASS TEST - February 2019

COURSE: BCA SE.MESTER: II


SUBJECT: Database Management System Max MARKS: 30
PAPER CODE: BCA-110 /
TIME: I Hour 30 Minutes

NOTE: PART-A is compulsory. Attempt any two from PART-B.

PART-A (10 Marks)

Ql. Describe the following: (2 X 5)

Types of attributes in ER diagram with Examples


b) Roles and Responsibilities of a DBA
c) Integrity Constraints ln SQL
d) Characteristics of DBMS
~DDL and DML commands in SQL
~-
PART-B (20 Marks)

Q2. a) Describe DBMS Architecture with diagram. How this architecture helps to achieve Data
Independence? (7 Marks)

b) Differentiate between Database Schema and Database State. (3 Marks)

Q-3 a) Construct an ER diagram .for the College Database: (7 Marks)

Following are the description of College Database:

• 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.

b) Exrlain Aggregate Functions in SQL with example. (3 Marks)


l

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

COURSE: BCA SEME;STER: TI


SUBJECT: Database Management System M.MARKS: 30
PAPER CODE: 110 TIME: l Hour 30 Mi utes

NOTE: PART-l_is Compulsor y. Attempt any two from PART-2

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.!==== =~

i) List the strong entity types in the ER diagram.


ii) Is there a weak entity type? If so, give its name, partial key and identifying relationship.
iii) What constraints do the partial key and the identifying relationship of the weak entity type
specify in this diagram?

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

DEPT I J deptname Ilocation j


L Statement for the following:
1. Find out the details of all employees whose name ends with 'a'.
2. For each department, find out the total no. of employees and their total salaries.

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)

i) Data integrity ii) Concurrency iii) Data independence


iv) Referential integrity

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)

Give an expression in SQL for the


following queries:
a) Find the names of employees wh
o work in deptno 10 and 20.
'b) Increase the salary by 1500 for
the employees who are 'cle rk'.
c) Display the detatls of the em
ployees who work in same
deptno as of the employee 'Sl\111
H'.
d) Create.the table Dept.
e) Display total salary of employee
s of each deptno and display
those deptno whose total salary is
more than Rs. 30000.
VIYEKANANOA INSTITUTF. OF PROFESSIONAL STUDIES
FIRST CLASS Tl'.ST - FE.BRlJARY 20l4

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.

Q3a) Tht: schema for the STUDENT table is as: (7)

STUDENT

! Rollno \ name \ grade \ course \ m~~k;_~J

Write the SQL Statement for the following:


1. Find out the Rollr.io, name and grade of all students whose name starts with 'S'.
11. Display the total number of students enrolled with course 'bca'.
111. Update the grade with 'A 1 • where Rollno is 103.
1v. Arrange the whole table by, the ascending order of name.
v. For each course. get the course name , no. of students and their total marks.
v1. Add 011e more column address varchar(l2) to the table STUDENT .
v11. Insert a new record with the appropriate value.

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

mpt any two from PART-B.


NOTE: PART-A is compulsory. Atte

PART-A (10 Marks)


4): (2.5 X 4)
QI. Explain the following terms (any
ce.
1. Physical and Logical Data Independen
Langua ge & Data Man ipulation Language.
11. Data Definition
m. Simple and Composite attribute. ·
1v. SQL Data types.
onsibility.
v. Database Administrator & its resp

PART-B (20 Marks)


e_Manage111ent System? Wh at are the different
Q2. a) What ~e-yel1 mean by D.atabas essing system?
(5)
characteristics that distinguish DBM
S over file proc example.
t are Entity, Attribute and Rela tion ship in ER Model? Explain with suitable
b) Wha
(5)

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)

. b) Explain the advantages of SQL.

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

NOTE: Ql is Compulsory. Attempt any two from Q2 to Q4.

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)

Q3. Write short notes on:- (10)


(i) Functional Dependency and its various Inference rules.
(ii) Operations of Reiational Algebra and their functions.
Q4.
a)A database contains the following relational schemas. Write the SQL Statement for the
givenqueries: (6)
Supplier (sno, sname, status, city)
Part (JmQ, pname, color, weight, city)
Project (ino, jname, city)
Shipment (sno, pno, ino, qty)

i. Get the supplier names who supply part P3.


ii. Get the part numbers of part supplied by a supplier in 'PARIS'.
iii. Change the color of all Red parts to Orange.
iv. Get part name for part whose quantity>=t00.

(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

NOTE: Part-I is Compulsory. Attempt any two from Part-2.


Part-I
Quesl
a.
b.
Describe weak entity set~.
Explain multi-valu.ed and derived attribute with an example.
t
c. Explain any 2 DML commands with example.
d. Describe the entity integrity and referential integrity constraints.
e. Explain any two database users. [2*5=10 marks]
Part-2
Ques2
a. Differentiate between file system and database system
b. Explain the three schema architecture of DBMS :md state how it supports data independence.
15+5=10 marks]

Ques3 a. Consider a company databas_e with the followhg statements.

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.

b. Explain the concept of aggregation and generalization.


[6+4=10 Marks]
Ques4
a. Dist' uish between primary key, candidate key & super key. ,(~,.. eN-(>~
b e schem for the following·tables is as follows: c~ -
employee (pname,street,city) r~
,lj\ cs~ ~,w~.
works (pname.cname.salary)
(?Ompany (cname, city)
\:J = rec.
_,
manages (pname. manager name) ®s~ el'rf'~-~J
+..--- ~~., ...,6'1M •
rite the SQL Statement for the following: 1
1. Find the name of all employees who work for First Bank Corporation. • trJ~ • := (2~•'---
' t,.lv'fC4.f~: - · r·o
2. Find names and cities of residence of all employees who work for first bank corporation.
3. Find the name of all employees who live in the same city as the company for which they work.
4. Count the total no. of employees workin~ tor First Bank Corporation.
5. a
Add new column gender to the table employee. • J3'

.
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

mpt any 2 questions from Section B.


NOTE: Section A is compulsory. Atte
SECTION A
(2.5 X 4 =10 )
Ql. Describe the following:
examples
posite attri bute in ER diagram with
a) Multivalued attr ibut e and com istics of DBMS
gate Functions in SQL. d)Character
b) Types of DBMS Users. C)Aggre
c) Aggregate Functions in SQL
d) Characteristics of DBMS

· 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

,I city which this team belongs to

• 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

b) What do you •me 1v


an Inte grity Con stra lnJ Wh at are the variousleg rlty
;
constraints whi ih can be
(3 marks)
implem ente d on a data bas e? Exp lain with exar:nples.
"if t ,
f
Q4. a) Consider the following database schema: (7 marks)

STUDENT

Column Name Constraint


SNO Primary key
SNAME Not null
ADDRESS
YEAR OF ADMISSION
CGPA
COURSE NUM Foreign key

COURSE •
Column Name Constraint
COURSE NUM Primary Key
CNAME Not null

Write down the queries for the following:


1) Create STUDENT and COURSE tables with appropriate constraints.
2) Find out all the details of students whose name ends with 'a'.
3) For each course, find out the total number of students.
• 4) Find out the maximum CGPA of all the students who are studying in course "BCA"
SlI Insert detaiis of 2 students and courses into the tables.
6) Add a new column ENROLLMENT_NUM varchar(l0) to table STUDENT.
7) Find out the details of Student with highest CGPA for the year 2018.

b) What are joins in SQL? Differentiate between Inner Join and Outer Join with examples.
(3 Marks)

..
..

' .. t

,.
.. ,?.f.
.,
·,
3/!,'
_,,.;.

You might also like