Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

all final DBS

Total questions: 120

Worksheet time: 3600secs

Name
Class
Date
1.

What is the best data type definition for Oracle when a field is alphanumeric and has a fixed length?

a)

VARCHAR2

b)

CHAR

c)

LONG

d)

NUMBER

2.

What is the best data type definition for Oracle when a field is alphanumeric and its length may vary?

a)

VARCHAR2

b)

CHAR

c)

LONG

d)

NUMBER

3.

Selecting a data type involves which of the following?

a)

Maximize storage space

b)

Represent most values

c)

Improve data integrity

d)

All of the above

4.

If a denormalization situation exists with a one-to-one binary relationship, which is true?

a)

All fields stored in one relation

b)

All fields stored in two relations

c)

All fields stored in three relations

d)

All fields stored in four relations

5.

If a denormalization situation exists with a many-to-many relationship, which is true?

a)

All fields stored in one relation

b)

All fields stored in two relations

c)

All fields stored in three relations

d)

All fields stored in four relations

6.

Which of the following is an advantage of partitioning?

a)

Complexity

b)

Inconsistent access speed

c)

Extra space

d)

Security

7.

Sequential retrieval on a primary key for sequential file storage has which feature?

a)

Very fast

b)

Moderately fast

c)

Slow

d)

Impractical

8.

A rule of thumb for choosing indexes includes which of the following?

a)

Indexes are more useful on smaller tables

b)

Indexes are more useful for columns not used in WHERE

c)

Do not specify unique index for primary key

d)

Be careful indexing attributes with null values

9.

Which of the following are integrity controls that a DBMS may support?

a)

Assume default value

b)

Limit permissible values

c)

Limit nulls in some fields

d)

All of the above

10.

A secondary key is which of the following?

a)

Non-unique key

b)

Primary key

c)

Useful for denormalization decisions

d)

Determines tablespace

11.

The fastest read/write time and most efficient data storage of any disk array type is:

a)

RAID-0

b)

RAID-1

c)

RAID-2

d)

RAID-3

12.

A multidimensional database model is most often used in:

a)

Data warehouse

b)

Relational

c)

Hierarchical

d)

Network

13.

Which is NOT a factor when switching block sizes?

a)

Length of fields in row

b)

Number of columns

c)

Block contention

d)

Random row access speed

14.

Which improves query processing time?

a)

Write complex queries

b)

Combine table with itself

c)

Query within query

d)

Use compatible data types

15.

The blocking factor is:

a)

Group of fields stored together

b)

Number of physical records per page

c)

Attributes grouped by primary key

d)

Attributes grouped by secondary key

16.

The command to eliminate a table from a database is:

a)

REMOVE TABLE CUSTOMER

b)

DROP TABLE CUSTOMER

c)

DELETE TABLE CUSTOMER

d)

UPDATE TABLE CUSTOMER

17.

The command to eliminate a row from a table is:

a)

REMOVE FROM CUSTOMER

b)

DROP FROM CUSTOMER

c)

DELETE FROM CUSTOMER

d)

UPDATE FROM CUSTOMER

18.

Which command sorts rows in SQL?

a)

SORT BY

b)

ALIGN BY

c)

ORDER BY

19.

Correct processing order for SQL SELECT statements:

a)

SELECT, FROM, WHERE

b)

FROM, WHERE, SELECT

c)

WHERE, FROM, SELECT

d)

SELECT, WHERE, FROM

20.

A view is which of the following?

a)

A virtual table accessible via SQL

b)

A virtual table not accessible

c)

A base table accessible via SQL

d)

A base table not accessible

21.

Which of the following is valid SQL for creating an index?

a)

CREATE INDEX ID

b)

CHANGE INDEX ID

c)

ADD INDEX ID

d)

REMOVE INDEX ID

22.

Which SQL statement is equivalent 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 IN CUSTOMER WHERE STATE = 'V'

d)

SELECT NAME FROM CUSTOMER WHERE STATE IN ('VA')

23.

What was the original purpose of SQL?

a)

Define SQL DDL semantics

b)

Define SQL DML semantics

c)

Define data structures

d)

All of the above

24.

Benefits of a standard relational language include:

a)

Reduced training costs

b)

Increased dependence on a single vendor

c)

Applications are not needed

d)

All of the above

25.

Which must be considered when creating a table in SQL?

a)

Data types

b)

Primary keys

c)

Default values

d)

All of the above

26.

ON UPDATE CASCADE ensures:

a)

Normalization

b)

Data Integrity

c)

Materialized Views

d)

All of the above

27.

You can add a row using SQL with which command?

a)

ADD

b)

CREATE

c)

INSERT

d)

MAKE

28.

The wildcard in a SELECT statement is:

a)

%

b)

&

c)

#

d)

@

29.

The wildcard in a WHERE clause is useful when:

a)

Exact match is necessary in SELECT

b)

Exact match is not possible in SELECT

c)

Exact match necessary in CREATE

d)

Exact match impossible in CREATE

30.

The HAVING clause does which of the following?

a)

Acts like WHERE for groups

b)

Acts like WHERE for rows

c)

Acts like WHERE for columns

d)

Acts exactly like WHERE

31.

Data manipulation language (DML) commands are used for:

a)

Creating, altering, dropping tables

b)

Defining database structures

c)

Processing and manipulating data

d)

All of the above

32.

SQL SELECT statement with aggregate functions returning multiple values is:

a)

Scalar aggregate

b)

Vector aggregate

c)

Group aggregate

d)

None of the above

33.

A dynamic view is:

a)

A view whose contents are stored permanently

b)

A view that materializes only when accessed

c)

A base table

d)

A static snapshot

34.

Indexes can be created for:

a)

Only primary keys

b)

Only secondary keys

c)

Both primary and secondary keys

d)

None

35.

SELECT DISTINCT allows a user to:

a)

See duplicate rows

b)

Remove duplicate rows

c)

Include null rows

d)

None of the above

36.

COUNT(field_name) does what?

a)

Counts all rows

b)

Counts non-null values only

c)

Counts null rows

37.

SUM, AVG, MIN, MAX can be used on:

a)

Numeric columns only

b)

All data types

c)

Date and numeric only

d)

None

38.

To establish a range of values the operators used are:

a)

= and <>

b)

< and >

c)

!= and =

d)

<= and =

39.

DISTINCT (or ALL) can be used:

a)

Only once

b)

Multiple times

c)

Only with WHERE

d)

Only with numeric columns

40.

Which of the following is generally used for performing tasks like creating the structure of relations and deleting relations?

a)

DML (Data Manipulation Language)

b)

Query

c)

Relational Schema

d)

DDL (Data Definition Language)

41.

Which of the following provides the ability to query information, insert, delete, and modify tuples in the database?

a)

DML

b)

DDL

c)

Query

d)

Relational Schema

42.

Which query is equivalent to: SELECT name, course_id FROM instructor, teaches WHERE instructor_ID = teaches_ID;

a)

SELECT name, course_id FROM teaches, instructor WHERE instructor_id = course_id

b)

SELECT name, course_id FROM instructor NATURAL JOIN teaches

c)

SELECT name, course_id FROM instructor

d)

SELECT course_id FROM instructor JOIN teaches

43.

Which statement likely contains an error?

a)

select * from emp where empid = 10003;

b)

select empid from emp where empid = 10006;

c)

select empid from emp;

d)

select empid where empid = 1009 AND Lastname = 'GELLER';

44.

In the query below, what wildcard goes in the blank? WHERE dept_name LIKE '____ Computer Science' (to find dept names ending with “Computer Science”)

a)

&

b)

_

c)

%

d)

$

45.

What is a one-to-many relationship?

a)

One class may have many teachers

b)

One teacher can have many classes

c)

Many classes may have many teachers

d)

Many teachers may have many classes

46.

Fill the blanks for ORDER BY: Sort salary highest → lowest, then name alphabetically. ORDER BY salary ___, name ___.

a)

Ascending, Descending

b)

Asc, Desc

c)

Desc, Asc

d)

All of the above

47.

Equivalent query for: SELECT name FROM instructor1 WHERE salary <=100000 AND salary >=90000;

a)

WHERE salary BETWEEN 100000 AND 90000

b)

WHERE salary BETWEEN 90000 AND 100000

c)

SELECT name FROM instructor1 WHERE salary BETWEEN 90000 AND 100000

d)

WHERE salary <=90000 AND salary >=100000

48.

Which refers to “data about data”?

a)

Directory

b)

Sub Data

c)

Warehouse

d)

Metadata

49.

Which level describes how data is actually stored?

a)

Conceptual

b)

Physical

c)

File level

d)

Logical

50.

A file is a collection of related ______.

a)

Rows & columns

b)

Fields

c)

Database

d)

Records

51.

Rows of a relation are known as:

a)

Degree

b)

Tuples

c)

Entity

d)

All of the above

52.

The number of tuples in a relation is called:

a)

Entity

b)

Column

c)

Cardinality

d)

None

53.

Which is a Data Manipulation Command?

a)

Create

b)

Alter

c)

Delete

54.

Which is a Data Definition Language command?

a)

Create

b)

Update

c)

Delete

d)

Merge

55.

A top-down approach where a higher-level entity is divided into sub-entities is:

a)

Aggregation

b)

Generalization

c)

Specialization

d)

All of the above

56.

Multiple lower-level entities grouped into one higher-level entity is:

a)

Specialization

b)

Generalization

c)

Aggregation

d)

None

57.

In a relational database, tuples divided into fields are known as:

a)

Queries

b)

Domains

c)

Relations

d)

All of the above

58.

In a relational table, “attribute” refers to:

a)

Entity

b)

Row

c)

Column

d)

Both b & c

59.

Number of attributes in a relation is called:

a)

Degree

b)

Row

c)

Column

d)

All

60.

Used in application programs to request data from DBMS:

a)

Data Manipulation Language

b)

Data Definition Language

c)

Data Control Language

d)

All

61.

Command that saves a transaction permanently:

a)

COMMIT

b)

ROLLBACK

c)

SAVEPOINT

d)

None

62.

Command that restores database to last committed state:

a)

Savepoint

b)

Rollback

c)

Commit

d)

Both a & b

63.

Collection of information stored in a database at a specific time is a:

a)

Independence

b)

Instance

c)

Schema

d)

Domain

64.

SQL stands for:

a)

Standard Query Language

b)

Sequential Query Language

c)

Structured Query Language

d)

Server-side Query Language

65.

Purpose of DML:

a)

Addition of new structure

b)

Manipulation & processing of database

c)

Definition of physical structure

d)

All

66.

In relational model, relations are known as:

a)

Tuples

b)

Attributes

c)

Rows

d)

Tables

67.

Key used to represent relationship between tables:

a)

Primary key

b)

Foreign key

c)

Secondary key

d)

None

68.

Keyword used to count values in a column:

a)

TOTAL

b)

COUNT

c)

SUM

d)

ADD

69.

Term commonly used to define overall design of database:

a)

Application program

b)

Data definition language

c)

Schema

d)

Source code

70.

Command to modify a column inside a table:

a)

Drop

b)

Update

c)

Alter

d)

Set

71.

____ business rules are implemented in a database.

a)

Five

b)

Three

c)

Not all

d)

All

72.

The SDLC phase in which every data attribute, category, and relationship is defined is the _____ phase.

a)

Design

b)

Implementation

c)

Analysis

d)

Planning

73.

A key that consists of more than one attribute is called a:

a)

Multivalued key

b)

Foreign key

c)

Cardinal key

d)

Composite key

74.

Relationships have ______, representing the number of instances participating between entities.

a)

Line

b)

Constraint

c)

Cardinality

d)

Degree

75.

The rule specifying a supertype instance may belong to no subtype is:

a)

Partial specialization

b)

Disjointness

c)

Total specialization

d)

Semi-specialization

76.

ER diagrams include ____ for entities and ____ for relationships.

a)

Rectangles, cardinalities

b)

Objects, lines

c)

Oval, cardinalities

d)

Object, degrees

e)

Rectangles, lines

77.

Subtypes should be used when:

a)

A recursive relationship is needed

b)

Some attributes apply to only some instances

c)

Instances do not participate in unique relationships

d)

Supertypes relate to external objects

78.

A form of database specification mapping conceptual requirements is called:

a)

Physical specifications

b)

Security specifications

c)

Response specifications

d)

Logical specifications

79.

A ____ degree represents a relationship between entities of the same type.

a)

Multiple

b)

Ternary

c)

Unary

d)

Binary

80.

A constraint between two attributes is called a:

a)

Functional relation constraint

b)

Attribute dependency

c)

Functional relation

d)

Functional dependency

81.

A simple attribute has no component parts. A _____ attribute can be broken down. A _____ attribute is computed from others. Example: _____.

a)

simple, composite, derived; age = current year − birth year

b)

simple, derived, composite; age = birth year − current year

c)

composite, simple, derived; age = current year + birth year

d)

simple, multivalued, derived; age = current year × birth year

82.

Relationship _____ specify number of entity types involved.

a)

Line

b)

Cardinality

c)

Constraint

d)

Degree

83.

Main goals of normalization include all EXCEPT:

a)

Maximize storage space

b)

Simplify referential integrity

c)

Make data easier to maintain

d)

Minimize redundancy

84.

Which constraint ensures referential integrity?

a)

Primary key

b)

Foreign key

c)

Unique

d)

Check

85.

The rule stating no primary key value may be null is the:

a)

Entity integrity rule

b)

Partial specialization rule

c)

Referential integrity rule

d)

Domain rule

86.

Which is NOT a good characteristic of a data name?

a)

Readable

b)

Relates to business characteristics

c)

Relates to technical characteristics

d)

Repeatable

87.

The logical representation of organizational data is called a:

a)

Relationship systems design

b)

Database entity diagram

c)

Database model

d)

Entity-relationship model

88.

Purpose of normalization in relational design:

a)

Reduce redundancy and improve integrity

b)

Convert ERD to relational model

c)

Increase redundancy

d)

Ensure every table has a foreign key

89.

A two-dimensional table of data is called a:

a)

Relation

b)

Declaration

c)

Set

d)

Group

90.

A domain definition includes all EXCEPT:

a)

Integrity constraints

b)

Domain name

c)

Size

d)

Data type

91.

When transforming ER diagrams to relations, a ____ attribute becomes a separate relation with a FK.

a)

Derived

b)

Multivalued

c)

Composite

d)

Complicated

92.

The rule specifying each supertype instance MUST belong to a subtype is:

a)

Total specialization

b)

Partial specialization

c)

Total convergence

d)

Semi-specialization

93.

Which scenario requires denormalization?

a)

Ensure 3NF

b)

Reduce null values

c)

Improve read performance, avoid joins

d)

Reduce redundancy

94.

Which constraint prevents invalid data?

a)

Referential integrity

b)

Entity integrity

c)

Domain integrity

d)

All of the above

95.

A ______ defines or constrains some aspect of business.

a)

Business rule

b)

Business structure

c)

Business control

d)

Business constraint

96.

Which ensures consistency of relationships between tables?

a)

Entity integrity

b)

Functional dependency

c)

Domain integrity

d)

Referential integrity

97.

______ constraints define whether a supertype instance must belong to a subtype.

a)

Total specialization

b)

Completeness

c)

Partial specialization

d)

Disjointness

98.

______ database specification indicates parameters for physical storage.

a)

Schematic

b)

Physical

c)

Logical

d)

Conceptual

99.

A ______ attribute depends on others for its value.

a)

Derived

b)

Foreign

c)

Multivalued

d)

Single-valued

100.

Referential integrity requires any ____ value must match a ____ value in the parent table.

a)

Non-key → primary key

b)

Primary key → foreign key

c)

Non-key → determinant

d)

Foreign key → primary key

101.

The property by which subtype entities inherit the attributes of a supertype is called:

a)

Hierarchy reception

b)

Class management

c)

Generalization

d)

Attribute inheritance

102.

In an ER diagram, how many business rules exist for every relationship?

a)

One

b)

Zero

c)

Two

d)

Three

103.

A relation with no multivalued attributes, whose non-key attributes depend solely on the primary key but still contains transitive dependencies, is in which normal form?

a)

Third

b)

Second

c)

Fourth

d)

First

104.

______ is a component of the relational data model used to specify business rules to maintain integrity.

a)

Business integrity

b)

Data structure

c)

Data integrity

d)

Business rule constraint

105.

An entity should NOT be:

a)

An output of the database system

b)

An object composed of multiple attributes

c)

An object being modeled

d)

An object with many instances

e)

A user of the database

106.

Given the functional dependencies F = {A → B, B → C, A → C}, the table:

a)

Violates 1NF

b)

Is in 2NF but not 3NF

c)

Violates 2NF

d)

Violates 3NF due to transitive dependencies

107.

What is the best data type for Oracle when a field is alphanumeric with fixed length?

a)

VARCHAR2

b)

CHAR

c)

LONG

d)

NUMBER

108.

What is the best data type for Oracle when a field is alphanumeric with variable length?

a)

VARCHAR2

b)

CHAR

c)

LONG

d)

NUMBER

109.

Selecting a data type involves which of the following?

a)

Maximize storage space

b)

Represent most values

c)

Improve data integrity

d)

All of the above

110.

If a denormalization situation exists with a one-to-one relationship:

a)

All fields in one relation

b)

All fields in two relations

c)

All fields in three relations

d)

All fields in four relations

111.

If a denormalization situation exists with a many-to-many relationship:

a)

One relation

b)

Two relations

c)

Three relations

d)

Four relations

112.

Which is an advantage of partitioning?

a)

Complexity

b)

Inconsistent speed

c)

Extra space

d)

Security

113.

Sequential retrieval on a primary key is:

a)

Very fast

b)

Moderately fast

c)

Slow

d)

Impractical

114.

Rule of thumb for choosing indexes:

a)

More useful on smaller tables

b)

Useful when column not used in WHERE

c)

Never specify unique index for PK

d)

Be careful indexing NULL attributes

115.

Integrity controls a DBMS may support include:

a)

Default values

b)

Restrict permissible values

c)

Limit nulls

d)

All of the above

116.

A secondary key is:

a)

Non-unique key

b)

Primary key

c)

Needed for denormalization

d)

Determines tablespace

117.

Fastest disk array (read/write) is:

a)

RAID-0

b)

RAID-1

c)

RAID-2

d)

RAID-3

118.

Multidimensional database models are mostly used in:

a)

Data warehouse

b)

Relational systems

c)

Hierarchical databases

d)

Network databases

119.

Factor NOT considered when changing block size:

a)

Row length

b)

Number of columns

c)

Block contention

d)

Random access speed

120.

Which improves query processing time?

a)

Writing complex queries

b)

Self join

c)

Nested queries

d)

Using compatible data types