wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Lesson 4 - Fundamentals of Database Systems

Total questions: 25

Worksheet time: 13mins

Name
Class
Date
1.

Character and date literals must be enclosed in double quotation marks.

a)

True

b)

False

2.

What are the function/s that are not available in procedural statements?

a)

Miscellaneous functions

b)

Data-type conversions

c)

DECODE

d)

Group functions

3.

v_emp_name:= v_first_name|' '|v_last_name;


Is this how you concatenate variables?

a)

Yes

b)

No

4.

TRUNC is a valid date function in PL/SQL

a)

True

b)

False

5.

v_new_date := ADD_MONTHS(SYSDATE,v_num_months);


This is how you add months to a current date.

a)

True

b)

False

6.

It is where the PL/SQL attempts to convert data types

dynamically if they are mixed in a statement.

a)

Implicit Conversions

b)

Explicit Conversions

7.

It converts values from one data type to

another by using built-in functions.

a)

Implicit Conversions

b)

Explicit Conversions

8.

It is strongly recommended that you AVOID allowing SQL or

PL/SQL to perform explicit conversions on your behalf.

a)

True

b)

False

9.

The operations within an expression are performed in a

particular order depending on their precedence(priority).

a)

True

b)

False

10.

What is the highest priority in the default order of operations?

a)

**

b)

/

c)

+

d)

AND

11.

What is the lowest priority in the default order of operations?

a)

+

b)

=

c)

NULL

d)

OR

12.

The basic units (procedures, functions, and anonymous blocks) are logical blocks, which can contain any number of nested sub-blocks.

a)

True

b)

False

13.

These are blocks of code placed within other

blocks of code.

a)

Variable Scope

b)

Nested Blocks

c)

PL/SQL Blocks

d)

Unnested Blocks

14.

It is where the block or blocks in which the

variable is accessible, that is, where it can be used.

a)

Variable scope

b)

Nested Blocks

c)

PL/SQL Blocks

d)

Lexical Blocks

15.

If PL/SQL does not find the variable declared locally, it looks

downward into the child blocks.

a)

True

b)

False

16.

You can declare variables with the same name in two different blocks when one block is nested within the other block.

a)

True

b)

False

17.

It is a label given to a block.

a)

Identifier

b)

Variable

c)

Block Name

d)

Qualifier

18.

What if the same name is used for two variables, one in each of the blocks?

a)

Put a qualifier block in the outer block so that it can be called if it will be the block that will be used.

b)

Add a function to the outer block so that it can be called if it will be the block that will be used.

c)

The inner block will be read instead of the outer block.

19.

Use implicit data type conversions because explicit data

type conversions can be slower and the rules can change

in later software releases.

a)

True

b)

False

20.

What are the good programming practices demonstrated and/or discussed:

a)

Avoid ambiguity when choosing identifiers.

b)

Use the %TYPE attribute to declare a variable

c)

Declare two variables or constant identifier per line for

better readability and code maintenance.

d)

Use the NULL constraint when declaring a variable

that must hold a value.

21.

Identifiers, tables, and columns should be written in ____ based on the guidelines.

a)

Uppercase

b)

Lowercase

c)

Any of the two

22.

The naming of identifiers should be:

a)

consistent

b)

clear

c)

inconsistent

d)

ambigous

e)

unambigous

23.

Programming guidelines include:

a)

Documenting code without comments

b)

Developing a case convention for the code

c)

Developing naming conventions only for identifiers

d)

Enhancing readability by indenting

24.

PL/SQL keyword are written in ______ based on the guidelines.

a)

Uppercase

b)

Lowercase

c)

Any of the two

25.

Data types are written in _______ based on the guidelines.

a)

Uppercase

b)

Lowercase

c)

Any of the two