Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

GEM of DBMS

Total questions: 60

Worksheet time: 53mins

Name
Class
Date
1.

In relational data model, the total number of rows can be identified as ______________________ .

a)

Cardinality

b)

Degree

c)

Attribute

d)

Entity

2.

Identify the total number of attributes in a relational data model.

a)

Tuple

b)

Entity

c)

Degree

d)

Cardinality

3.

Identify the candidate key.

a)

W

b)

X

c)

Y

d)

Z

4.

If related data exists in more than one table, they can be joined by using the Primary Key link to the same key in the other table. Identify this key.

a)

Foreign Key

b)

Primary Key

c)

Candidate Key

d)

Composite Key

5.

Choose the CORRECT symbol of SELECT in the Relational Algebra

a)

x

b)

π\pi

c)

∩\cap

d)

σ\sigma

6.

Based on the figure above, identify the number of tuples that will be returned by the following relational algebra query : σ \sigma\ Type = 'Saving' (Account)

a)

2

b)

3

c)

6

d)

0

7.

Base on the table given, identify output that will be produced when, σ Salary > 3000 ˅ City = ‘Batu Pahat’ (WORKER).

a)
b)
c)
d)
8.
A row in a database.
a)
Record
b)
Field
c)
Entity
d)
Table
9.
A column in a database.
a)
Field
b)
Record
c)
Entity
d)
Validation
10.
A unique identifying field.
a)
Primary Key
b)
Integer
c)
Verification
d)
Boolean
11.
What language does the Relational Model use?
a)
Java
b)
Python
c)
SQL
d)
C++
12.
How many records are in this database?
a)
8
b)
5
c)
10
d)
12
13.
What is the primary key in this database?
a)
Emp_Id
b)
Last Name
c)
Gender
d)
Title
14.

Recognize the following that hold a single value attribute

a)

Address

b)

Register number

c)

Reference

d)

Subject_taken

15.

Based on the table given, identify the relation name.

a)

AccoundID

b)

Car Loan

c)

Account

d)

Balance

16.
What is E-R model used for?
a)
To extract content  from the database
b)
To design and visualize database
c)
To create a graphical user interface
17.

Which of the following relational algebra operations do not require the participating tables to be union-compatible?

a)

unioin

b)

intersection

c)

difference

d)

cartesian product

18.

The rule that a value of a foreign key must appear as a value of some specific table is called as

a)

Referential constraint

b)

Index

c)

Integrity constraint

d)

Domain constraint

19.

Minimal Superkeys are called

a)

Primary key

b)

Foreign key

c)

Candidate key

d)

Attribute keys

20.

Which of the following is not a restriction for a table to be a relation?

a)

The cells of the table must contain a single value.

b)

All of the entries in any column must be of the same kind.

c)

The columns must be ordered.

d)

No two rows in a table may be identical.

21.
a)

v_num is Null

b)

v_num is NOT Null

c)

compilation error

d)

runtime error

22.

Which error occurs while the program is running and cannot be detected by the PL/SQL compiler?

a)

Syntax error

b)

Runtime error

c)

Both A & B

d)

None of the above

23.

Which keyword is used instead of the assignment operator to initialize variables?

a)

NOT NULL

b)

DEFAULT

c)

%TYPE

d)

%ROWTYPE

24.

________ does not correlate with an oracle error, instead, user_define

exceptions usually enforce business rules in situations

in which an oracle error would not necessarily occur

a)

Predefined Exception

b)

Internal Exception

c)

User defined Exception

d)

None of the above

25.

Which choice shows what I will see on the screen after the following block is executed?

a)

-1

VALUE_ERROR

b)

-1

TOO_MANY_ROWS

c)

3

NO ERROR

d)

1

NO ERROR

26.

Which SQL function is used to count the number of rows in a SQL query?

a)

COUNT()

b)

NUMBER()

c)

SUM()

d)

COUNT(*)

27.

With SQL, how do you select all the records from a table named “Persons” where the value of the column “FirstName” ends with an “a”?

a)

SELECT * FROM Persons WHERE FirstName=’a’

b)

SELECT * FROM Persons WHERE FirstName LIKE ‘a%’

c)

SELECT * FROM Persons WHERE FirstName LIKE ‘%a’

d)

SELECT * FROM Persons WHERE FirstName=’%a%’

28.

What does the ALTER TABLE clause do?

a)

The SQL ALTER TABLE clause modifies a table definition by altering, adding, or deleting table columns and/or constraints

b)

The SQL ALTER TABLE clause is used to insert data into database table

c)

THE SQL ALTER TABLE deletes data from database table

d)

The SQL ALTER TABLE clause is used to delete a database table

29.

Find the name of those cities with temperature and condition whose condition is either sunny or cloudy but temperature must be greater than 70.

a)

SELECT city, temperature, condition FROM weather WHERE condition = ‘sunny’ AND condition = ‘cloudy’ OR temperature > 70

b)

SELECT city, temperature, condition FROM weather WHERE condition = ‘sunny’ OR condition = ‘cloudy’ OR temperature > 70

c)

SELECT city, temperature, condition FROM weather WHERE condition = ‘sunny’ OR condition = ‘cloudy’ AND temperature > 70

d)

SELECT city, temperature, condition FROM weather WHERE condition = ‘sunny’ AND condition = ‘cloudy’ AND temperature > 70

30.

Find the names of these cities with temperature and condition whose condition is neither sunny nor cloudy.

a)

SELECT city, temperature, condition FROM weather WHERE condition NOT IN (‘sunny’, ‘cloudy’)

b)

SELECT city, temperature, condition FROM weather WHERE condition NOT BETWEEN (‘sunny’, ‘cloudy’)

c)

SELECT city, temperature, condition FROM weather WHERE condition IN (‘sunny’, ‘cloudy’)

d)

SELECT city, temperature, condition FROM weather WHERE condition BETWEEN (‘sunny’, ‘cloudy’);

31.

What will be the degree and cardinality of the cartesian product of two tables if the degree of first table is 3 and second table is 5. The cardinality of first table is 10 and cardinality of second table is 6.

a)

Degree 15, Cardinality 16

b)

Degree 8 Cardinality 16

c)

Degree 8 Cardinality 60

d)

Degree 15 cardinality 60

32.

Which query is incorrect?

a)

SELECT * FROM EMP WHERE CITY IN ('MUMBAI','DELHI','CHENNAI');

b)

SELECT * FROM EMP WHERE CITY NOT IN ('MUMBAI','DELHI','CHENNAI');

c)

SELECT * FROM EMP GROUP BY DEPT;

d)

ALL THE ABOVE

33.

Which database level is closest to the users?

a)

External

b)

Internal

c)

Physical

d)

Conceptual

34.

Who developed the E-R model?

a)

Codd

b)

Chen

c)

Date

d)

Bachman

35.

E-R model uses which symbol for Weak entity

a)

Rectangle

b)

Diamond

c)

Double rectangle

d)

Dotted line

36.
What relationship is a mother to child
a)
one to one
b)
many to many
c)
one to many
37.
What relationship is an actor to a film
a)
one to one
b)
many to many
c)
one to many
38.
What relationship is a car to a car registration number?
a)
one to one
b)
many to many
c)
one to many
39.

What you understand by data redundancy?

a)

Assurance of the accuracy of data

b)

Duplicate values in database

c)

Security of Data

d)

None of these

40.
A functional dependency is denoted by ….... symbol
a)
&
b)
*
c)
→
d)
%
41.
A functional dependency is a relationship between or among …….
a)
Tables
b)
Rows
c)
Relations
d)
Attributes
42.
There are two functional dependencies with the same set of attributes on the left side of the arrow: A→BC A→B This can be combined as
a)
A→BC
b)
A→B
c)
B→C
d)
None of the mentioned
43.
For a relation R(X, Y, Z, W) with primary key(X, Y) a functional dependency XY→Z is said to be ___________.
a)
Full Dependency
b)
Partial Dependency
c)
Trivial Dependency
d)
None of these
44.
If K → L then ___ → LM.
a)
KM
b)
LM
c)
KL
d)
NONE
45.
There is a relationship AC →B, A →D, and D→B. Here A is alone capable of determining B, which means B is …....................dependent on AC
a)
Partially
b)
Fully
c)
Medium
d)
Short
46.
In a schema with attributes A, B, C, D and E following set of functional dependencies are given {A → B, A → C, CD → E, B → D, E → A} Which of the following functional dependencies is NOT implied by the above set?
a)
CD → AC
b)
BD → CD
c)
BC → CD
d)
AC → BC
47.
Find Closure set of Attribute for the following: R(A,B,C,D,E,F), FD: AB → C, BC → AD, D → E, CF → B, (AB)+=?
a)
ABCDE
b)
ABC
c)
AB
d)
ABCDEF
48.
What is the Candidate Key for given FDs? FD : {EF→G ,F→IJ , EH→KL , K→M, L→N}
a)
{GI}
b)
{EFH}
c)
{KL}
d)
{IJ}
49.
Relation R has six attribute ABCDEF. F = { A → BC, B → CE, E → A, F → E} is a set of functional dependencies.How many candidate keys does the relation R have?
a)
1
b)
2
c)
4
d)
None of these
50.
Relation R has following attribute ABCDEF. F = { A → B, B → CE, E → A, F → E} is a set of functional dependencies. Which one is candidate key?
a)
D
b)
DF
c)
A
d)
AF
51.
For a given relation R has following attribute EFGHIJKLMN. What are prime attribute? FD : {EF→G ,F→IJ , EH→KL , K→M, L→N}
a)
E,F,H
b)
G,I
c)
K,L
d)
I,J
52.
Empdt1(empcode, name, street, city, state,pincode). For any pincode, there is only one city and state. Also, for given street, city and state, there is just one pincode. In normalization terms, empdt1 is a relation in
a)
1 NF only
b)
2 NF and hence also in 1 NF
c)
3NF and hence also in 2NF and 1NF
d)
BCNF and hence also in 3NF, 2NF and 1NF View Answer
53.
Third Normal Form is ….........................
a)
2NF and no transitive dependencies
b)
2NF or no transitive dependencies
c)
BCNF or no transitive dependencies
d)
None of these
54.
In which normal form conversion of composite attribute to individual attribute happens,
a)
First NF
b)
Second NF
c)
Third NF
d)
None of these
55.
F = {CH → G, A → BC, B → CFH, E → A, F → EG} is a set of functional dependencies The relation R is
a)
in 1NF, but not in 2NF.
b)
in BCNF
c)
in 3NF, but not in BCNF.
d)
in 2NF, but not in 3NF.
56.
S1: Every table with two single-valued attributes is in 1NF, 2NF, 3NF and BCNF. S2: AB→C, D→E, E→C is a minimal cover for the set of functional dependencies AB→C, D→E, AB→E, E→C. Which one of the following is CORRECT?
a)
Both S1 and S2 are FALSE.
b)
S1 is FALSE and S2 is TRUE.
c)
Both S1 and S2 are TRUE.
d)
S1 is TRUE and S2 is FALSE.
57.

The table attached is an example of First Normal Form.

a)

TRUE

b)

FALSE

58.

A table is in 2NF if it is in 1NF and if

a)

no column is not part of the primary key and is dependent on only a portion of the alternate key.

b)

no column that is not a part of the primary key is dependent on only a portion of the primary key.

c)

no column that is not a part of the primary key is dependent on only a portion of the foreign key.

d)

no column that is not a part of the primary key is dependent on only a portion of the candidate key.

59.

Non-prime attributes cannot be transitively dependent, so the relation must have the ___ normal form.

a)

First

b)

Second

c)

Third

d)

Fourth

60.

THE ASSOCIATION OF 2 DIFFERENT ENTITIES ARE CALLED

a)

DATA MODEL

b)

RELATIONSHIP

c)

ROW

d)

ATTRIBUTE