wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

JSKBS - Database Management System

Total questions: 15

Worksheet time: 15mins

Name
Class
Date
1.

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%’

2.

How can you change “Hansen” into “Nilsen” in the “LastName” column in the Persons table?

a)

UPDATE Persons SET LastName=’Hansen’ INTO LastName=’Nilsen’

b)

MODIFY Persons SET LastName=’Nilsen’ WHERE LastName=’Hansen’

c)

MODIFY Persons SET LastName=’Hansen’ INTO LastName=’Nilsen’

d)

UPDATE Persons SET LastName=’Nilsen’ WHERE LastName=’Hansen’

3.

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

4.

Referential Integrity is

a)

System of rules

b)

System of data

c)

Table constraints

d)

is related to Primary key

5.

______________ constraint prevents NULL values

a)

UNIQUE

b)

NOT NULL

c)

NULL

d)

FOREIGN KEY

6.

Every Boyee-Codd normal form is in

a)

1NF

b)

2Nf

c)

3NF

d)

all the above

7.

If every non-key attribute is functionally dependent on the primary key, then the relation will be in :

a)

1NF

b)

2NF

c)

3NF

d)

4NF

8.

What is a relationship?

a)
Person, Place, Object, event or concept about which the data is to be maintained
b)
Association between the instances 
c)
Named Property or characteristic
d)
The next important link
9.
What is an Entity? 
a)
Person or place.
b)
Association between the instances 
c)
Named Property or characteristic
d)
Person, Place, Object, event or concept about which the data is to be maintained
10.
What is an Attribute?
a)
Person, Place, Object, event or concept about which the data is to be maintained
b)
Association between the instances 
c)
Named Property or characteristic
d)
The next important link
11.
What is the Cardinality?
a)
Minimum and Maxiumum Number of instances of Entity B that can associated with each instance of Entity A
b)
Maximum Number of instances of Entity B that can associated with each instance of Entity A
c)
Minimum Number of instances of Entity B that can associated with each instance of Entity A
12.

Which of the following is false about the entity relationship diagram?

a)

Entities are represented by rectangles.

b)

All simple attributes are represented with single-lined ovals.

c)

Multi-valued attributes are represented with double-lined ovals.

d)

A derived attribute is connected to the entity by broken lines.

13.

Find the ID, name, dept name, salary for instructors whose salary is greater than $80,000 .

a)

{t | t ε instructor ∧ t[salary] > 80000}

b)

Э t ∈ r (Q(t))

c)

{t | Э s ε instructor (t[ID] = s[ID]∧ s[salary] > 80000)}

d)

None of the mentioned

14.

The attribute name could be structured as an attribute consisting of first name, middle initial, and last name. This type of attribute is called _______________

a)

Simple attribute

b)

Composite attribute

c)

Multivalued attribute

d)

Derived attribute

15.

A query in the tuple relational calculus is expressed as:

a)

{t | P() | t}

b)

{P(t) | t }

c)

{t | P(t)}

d)

All of the mentioned