Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

DBSM 121-180

Total questions: 60

Worksheet time: 30mins

Name
Class
Date
1.

Choose the correct relational algebra operation

a)

Union

b)

Difference

c)

Intersection

d)

Product

2.

Choose the correct relational algebra operation

a)

Union

b)

   Difference

c)

Intersection

d)

Product

3.

Choose the correct relational algebra operation

a)

Union

b)

Difference

c)

Intersection

d)

Product

4.

Choose the correct relational algebra

operation

a)

Union

b)

Difference

c)

Intersection

d)

Product

5.

The SQL WHERE clause

a)

Condition that limits the column data that are returned

b)

Condition that limits the row data are returned

c)

Clause that returns all rows

d)

Clause that returns nothing

6.

The command to eliminate a table from a database

a)

Drop

b)

Delete

c)

Remove

d)

Update

7.

Which of the following is correct order of keywords for SQL Select statement?

a)

SELECT, FROM, WHERE

b)

WHERE, FROM, SELECT

c)

FROM, WHERE, SELECT

d)

SELECT, WHERE, FROM

8.

Are given table union compatible ?

a)

Yes

b)

No

c)

I do not know

d)

May be

9.

SQL data definition commands make up a(n)

a)

DDC

b)

DML

c)

DDL

d)

DDD

10.

In a relation, the columns are also called attributes

a)

True

b)

False

c)

May be

d)

I do not know

11.

Find the SQL statement that is equal to: SELECT NAME FROM CUSTOMER

WHERE STATE = 'VA';

a)

SELECT NAME IN CUSTOMER WHERE STATE IN 'VA';

b)

SELECT NAME IN CUSTOMER WHERE STATE = 'VA';

c)

SELECT NAME FROM CUSTOMER WHERE STATE IN 'VA';

d)

SELECT NAME IN CUSTOMER WHERE STATE = 'V';

12.

In E\R diagrams, we will represent Entities as

a)

Boxes with rounded corners

b)

Links between two entities

c)

Ovals

d)

• Diamond box

13.

In E\R diagrams, we will represent Relationships as

a)

Boxes with rounded corners

b)

Links between two entities

c)

Ovals

d)

Diamond box

14.

In E\R diagrams, we will represent Attributes as

a)

Boxes with rounded corners

b)

Links between two entities

c)

Ovals

d)

Diamond box

15.

Many to many relationships are difficult to represent in database, so we need

to

a)

Split many to many relationship into two one to many relationships

b)

Split one to many relationship into two one to many relationships

c)

Split many to many relationship into one to many relationships

d)

Split many to many relationship into three one to many relationships

16.

The result of a SQL SELECT statement is a(n)

a)

Report

b)

Table

c)

Form

d)

File

17.

Which of the following are the five built-in functions provided by SQL?

a)

COUNT, SUM, AVG, MAX, MULT

b)

SUM, AVG, MIN, MAX, NAM

c)

SUM, AVG, MULT, DIV, MIN

d)

COUNT, SUM, AVG, MAX, MIN

18.

In a relation, the order of the rows matters

a)

True

b)

False

c)

I do not know

d)

May be

19.

Given the functional dependency R → (S,T) , then it is also true that R → S

a)

True

b)

False

c)

I do not know

d)

May be

20.

Given the functional dependency R → (S,T) , then it is also true that R → T

a)

True

b)

False

c)

I do not know

d)

May be

21.

SQL can be used to

a)

create database structures only

b)

query database data only

c)

modify database data only

d)

All of the these can be done by SQL

22.

The SQL statement that queries or reads data from a table is ________

a)

READ

b)

QUERY

c)

SELECT

d)

NONE

23.

A subquery in an SQL SELECT statement

a)

can only be used with two tables

b)

has a distinct form that cannot be duplicated by a join

c)

can always be duplicated by a join

d)

cannot have its results sorted using ORDER BY

24.

The SQL keyword BETWEEN is used

a)

for ranges

b)

as a wildcard

c)

to limit the columns displayed

d)

None of the above

25.

Sometimes you want to change the structure of an existing table, what are your

options?

a)

Change table

b)

Drop Table

c)

Alter Table

d)

Create Table

26.

how to Add a new column into existing table?

a)

ALTER TABLE Student MODIFY COLUMN sDegree CHAR(64) NOT NULL

b)

ALTER TABLE Student ADD COLUMN sDegree VARCHAR(64) NOT NULL

c)

ALTER TABLE S ADD COLUMN s VACHAR(64) NOT NULL

d)

ALTER TABLE Student DROP COLUMN sDegree VARCHAR(64) NOT NULL

27.

how to

rename a column in existing table?

a)

ALTER TABLE Student MODIFY COLUMN sDegree CHAR(64) NOT NULL

b)

ALTER TABLE Student ADD COLUMN sDegree VARCHAR(64) NOT NULL

c)

ALTER TABLE Student RENAME COLUMN s to SS VACHAR(64) NOT NULL

d)

ALTER TABLE Student DROP COLUMN sDegree VARCHAR(64) NOT NULL

28.

how to change the row(s) in a table

a)

insert

b)

update

c)

change

d)

delete

29.

how to remove the row(s) from a table

a)

insert

b)

update

c)

change

d)

delete

30.

Which of the following is not correct ?

a)

INSERT INTO Employee(ID, Name, Salary) VALUES(2,‘Mary’,26);

b)

INSERT INTO Employee (Name,ID) VALUES (‘Mary’,2);

c)

INSERT INTO Employee VALUES (2, ‘Mary’,26000);

d)

INSERT INTO Employe VALUES(26, ‘Mary’,26);

31.

Please increase salary for 10% ?

a)

UPDATE Employee SET Salary = Salary*0.5

b)

UPDATE Employee SET Salary = Salary * 0.1

c)

UPDATE Employee SET Salary = Salary * 1.1

d)

UPDATE Employee Update Salary = Salary*0.1

32.

Please remove staff, who earns more than 22000 ?

a)

DELETE FROM Employee WHERE Salary >=22000;

b)

DELETE FROM Employe WHERE Salary => 22000;

c)

REMOVE FROM Employee WHERE Salary >22000;

d)

DELETE FROM Employee WHERE Salary = 22000;

33.

πsName,sAddress(Student) is

equal to?

a)

SELECT Sname FROM Students

b)

SELECT Sname, SAddress FORM Students

c)

SELECT Sname and SAddress FROM Students

d)

SELECT Sname, SAddress FROM Student

34.

SQL query to find a list of the ID numbers and Marks for

students who have passed IAI

a)

Select ID, Mark from Grade Where code = 'IAI' and Mark > 50;

b)

Select ID, Mark from Grade Where code = 'AIA' and Mark > 50;

c)

Select ID, Mark, Code from Grade Where code = 'IAI';

d)

Select ID, Mark from Grade Where code = 'IAI' and Mark >=50;

35.

Find students who studying any Programming module

a)

Select First,Last from Student,Grade Where Code='PR1'OR'PR2'

b)

Select First,Last from Student Natural Join Grade Where Code like'PR%'

c)

Select First Last from Student Natural Join Grade Where Code like'PR%'

d)

Select First from Student Natural Join Grade Where Code = 'PR%'

36.

A SELECT statement can be nested inside another query to form a

a)

Subselect

b)

Subresults

c)

Subquery

d)

Query in query

37.

SQL uses privileges to control access to tables and other database objects, so

which is NOT?

a)

Select privilege

b)

Update privilege

c)

Insert privilege

d)

Drop privilege

38.

How to use privileges in SQL?

a)

ON<objects> TO<users> GRANT<privileges>

b)

GRANT<privileges> ON<objects> TO<users>

c)

GRANT<privileges> TO<users> ON<objects>

d)

GRANT<tables> ON<objects> TO<users>

39.

If Admin’ grants ALL privileges to ‘Manager’, and

SELECT to ‘Finance’ with grant option, So..

a)

‘Manager’ grants ALL to ‘Personnel’

b)

‘Manager’ grants SELECT to ‘Personnel’

c)

‘Finance’ grants SELECT to ‘Manager’

d)

‘Finance’ grants ALL to ‘Manager’

40.

If Admin’ grants ALL privileges to ‘Manager’, and

SELECT to ‘Finance’ with grant option, So..

a)

‘Finance’ grants SELECT to ‘Personnel’

b)

‘Manager’ grants SELECT to ‘Personnel’

c)

‘Finance’ grants SELECT to ‘Manager’

d)

‘Finance’ grants ALL to ‘Manager’

41.

If ‘Manager’ revokes ALL from ‘Personnel’

a)

‘Personnel’ still has ALL privileges from ‘Finance

b)

‘Finance’ still has SELECT privileges from ‘Personnel’

c)

‘Personnel’ still has SELECT privileges from ‘Finance’

d)

‘Admin’ still has ALL privileges from ‘Finance’

42.

If ‘Finance revokes SELECT from ‘Personnel’

a)

‘Personnel’ still has ALL privileges from ‘Finance’

b)

‘Finance’ still has SELECT privileges from ‘Personnel’

c)

‘Personnel’ still has ALL privileges from ‘Manager’

d)

‘Admin’ still has ALL privileges from ‘Finance’

43.

If ‘Admin’ revokes Select from ‘Finance’

a)

‘Personnel’ still has ALL privileges from ‘Finance’

b)

‘Finance’ still has SELECT privileges from ‘Personnel’

c)

‘Personnel’ still has ALL privileges from ‘Manager’

d)

‘Admin’ still has ALL privileges from ‘Finance’

44.

If ‘Admin’ revokes ALL from ‘Manager’

a)

‘Personnel’ still has ALL privileges from ‘Finance’

b)

‘Finance’ still has SELECT privileges from ‘Personnel’

c)

‘Finance still has SELECT privileges from ‘Admin’

d)

‘Admin’ still has ALL privileges from ‘Finance’

45.

If Admin’ grants ALL privileges to ‘Manager’, and

SELECT to ‘Finance’ with grant option, So..

a)

‘Manager’ grants ALL to ‘Personnel’

b)

‘Manager’ grants SELECT to ‘Personnel’

c)

‘Finance’ grants SELECT to ‘Manager’

d)

‘Finance’ grants ALL to ‘Manager’

46.

To convert any relation into _______, split any nonatomic values

a)

First normal form

b)

Second normal form

c)

Third normal form

d)

Fourth normal form

47.

A functional dependency (FD) is a

a)

link between three sets of attributes in a relation

b)

link between all sets of attributes in a relation

c)

link between four sets of attributes in a relation

d)

link between two sets of attributes in a relation

48.

which if the following does not refer to redundancy problems?

a)

INSERT anomalies

b)

CREATE anomalies

c)

UPDATE anomalies

d)

DELETE anomalies

49.

To convert any relation into _______, remove transitive dependency

a)

First normal form

b)

Second normal form

c)

Third normal form

d)

Fourth normal form

50.

To convert any relation into _______, split any nonatomic values

a)

First normal form

b)

Second normal form

c)

Third normal form

d)

Fourth normal form

51.

A functional dependency (FD) is a

a)

link between three sets of attributes in a relation

b)

link between all sets of attributes in a relation

c)

link between four sets of attributes in a relation

d)

link between two sets of attributes in a relation

52.

which if the following does not refer to redundancy problems?

a)

INSERT anomalies

b)

CREATE anomalies

c)

UPDATE anomalies

d)

DELETE anomalies

53.

To convert any relation into _______, remove transitive dependency

a)

First normal form

b)

Second normal form

c)

Third normal form

d)

Fourth normal form

54.

SQL stands for

a)

Sequence Question Language

b)

Structured Query Language

c)

Structured Querty Language

d)

Selection Query Language

55.

What is it ?

a)

Relation

b)

Tuples

c)

Attributes

d)

Relationships

56.

What is it ?

a)

Relation

b)

Tuples

c)

Attributes

d)

Relationships

57.

What is it ?

a)

Relation

b)

Tuples

c)

Attributes

d)

Relationships

58.

which if the following does not refer to redundancy problems?

a)

INSERT anomalies

b)

CREATE anomalies

c)

UPDATE anomalies

d)

DELETE anomalies

59.

To convert any relation into _______, remove transitive dependency

a)

First normal form

b)

Second normal form

c)

Third normal form

d)

Fourth normal form

60.

To convert any relation into _______, split any nonatomic values

a)

First normal form

b)

Second normal form

c)

Third normal form