wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

DBS 3

Total questions: 74

Worksheet time: 37mins

Name
Class
Date
1.

SQL data definition commands make up a(n) ________ .

a)

DDL

b)

DML

c)

HTML

d)

XML

2.

Which of the following is valid SQL for an Index?

a)

CREATE INDEX ID;

b)

CHANGE INDEX ID;

c)

ADD INDEX ID;

d)

REMOVE INDEX ID;

3.

The SQL keyword(s) ________ is used with wildcards.

a)

A. LIKE only

b)

B. IN only

c)

C. NOT IN only

d)

D. IN and NOT IN

4.

Which of the following is the correct order of keywords for SQL SELECT statements?

a)

SELECT, FROM, WHERE

b)

FROM, WHERE, SELECT

c)

WHERE, FROM,SELECT

d)

SELECT,WHERE,FROM

5.

A subquery in an SQL SELECT statement is enclosed in:

a)

braces -- {...}.

b)

CAPITAL LETTERS.

c)

parenthesis -- (...).

d)

brackets -- [...].

6.

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

a)

report

b)

form

c)

file

d)

table

7.

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

a)

COUNT, SUM, AVG, MAX, MIN

b)

SUM, AVG, MIN, MAX, MULT

c)

SUM, AVG, MULT, DIV, MIN

d)

SUM, AVG, MIN, MAX, NAME

8.

In an SQL SELECT statement querying a single table, according to the SQL-92 standard the asterisk (*) means that:

a)

all columns of the table are to be returned.

b)

all records meeting the full criteria are to be returned.

c)

all records with even partial criteria met are to be returned.

d)

None of the above is correct.

9.

The HAVING clause does which of the following?

a)

Acts like a WHERE clause but is used for groups rather than rows.

b)

Acts like a WHERE clause but is used for rows rather than columns.

c)

Acts like a WHERE clause but is used for columns rather than groups.

d)

Acts EXACTLY like a WHERE clause.

10.

The SQL-92 wildcards are ____ and ____.

a)

asterisk (*); percent sign (%)

b)

percent sign (%); underscore (_)

c)

underscore (_); question mark (?)

d)

question mark (?); asterisk (*)

11.

To remove duplicate rows from the results of an SQL SELECT statement, the ________ qualifier specified must be included.

a)

DISTINCT

b)

Only

c)

UNIQUE

d)

SINGLE

12.

The benefits of a standard relational language include which of the following?

a)

Reduced training costs

b)

Increased dependence on a single vendor

c)

Applications are not needed.

d)

All of the above.

13.

Which of the following do you need to consider when you make a table in SQL?

a)

Data types

b)

Primary keys

c)

Default values

d)

All of the above.

14.

SQL query and modification commands make up a(n) ________ .

a)

DDL

b)

DML

c)

HTML

d)

XML

15.

When three or more AND and OR conditions are combined, it is easier to use the SQL keyword(s):

a)

LIKE only.

b)

IN only.

c)

NOT IN only.

d)

Both IN and NOT IN.

16.

The Microsoft Access wildcards are ____ and ____ .

a)

asterisk (*); percent sign (%)

b)

percent sign (%); underscore (_)

c)

underscore(_); question mark (?)

d)

question mark (?); asterisk (*)

17.

Find the SQL statement below that is equal to the following: 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');

18.

Which one of the following sorts rows in SQL?

a)

SORT BY

b)

ALIGN BY

c)

ORDER BY

d)

GROUP BY

19.

To sort the results of a query use:

a)

SORT BY.

b)

GROUP BY.

c)

ORDER BY.

d)

None of the above is correct.

20.

To define what columns should be displayed in an SQL SELECT statement:

a)

use FROM to name the source table(s) and list the columns to be shown after SELECT.

b)

use USING to name the source table(s) and list the columns to be shown after SELECT.

c)

use SELECT to name the source table(s) and list the columns to be shown after USING.

d)

use USING to name the source table(s) and list the columns to be shown after WHERE.

21.

SQL can be used to:

a)

create database structures only.

b)

query database data only.

c)

All of the above can be done by SQL.

d)

modify database data only.

22.

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

a)

SELECT

b)

READ

c)

QUERY

d)

None of the above is correct.

23.

The SQL keyword BETWEEN is used:

a)

for ranges.

b)

to limit the columns displayed.

c)

as a wildcard.

d)

None of the above is correct.

24.

A subquery in an SQL SELECT statement:

a)

can only be used with two tables.

b)

can always be duplicated by a join.

c)

has a distinct form that cannot be duplicated by a join

d)

has a distinct form that cannot be duplicated by a join

25.

________ was adopted as a national standard by ANSI in 1992.

a)

Oracle

b)

SQL

c)

Microsoft Access

d)

DBase

26.

SQL is:

a)

a programming language.

b)

an operating system.

c)

a data sublanguage.

d)

a DBMS.

27.

The SQL command to create a table is:

a)

MAKE TABLE.

b)

ALTER TABLE.

c)

DEFINE TABLE.

d)

CREATE TABLE.

28.

A ________ is a stored program that is attached to a table or a view.

a)

pseudofile

b)

embedded SELECT statement

c)

trigger

d)

None of the above is correct.

29.

The DROP TABLE statement:

a)

deletes the table structure only.

b)

deletes the table structure along with the table data.

c)

works whether or not referential integrity constraints would be violated.

d)

is not an SQL statement.

30.

SQL views can be used to hide:

a)

columns and rows only.

b)

complicated SQL syntax only.

c)

both of the above can be hidden by an SQL view.

d)

None of the above is correct.

31.

The SQL statement to create a view is:

a)

CREATE VIEW

b)

MAKE VIEW

c)

SELECT VIEW

d)

INSERT VIEW

32.

To update an SQL view, the DBMS must be able to associate the column(s) to be updated with:

a)

a particular column in a particular underlying table.

b)

a particular column in a particular row.

c)

a particular row in a particular underlying table.

d)

None of the above is correct.

33.

Which of the following is NOT a type of SQL constraint?

a)

PRIMARY KEY

b)

FOREIGN KEY

c)

ALTERNATE KEY

d)

UNIQUE

34.

What SQL structure is used to limit column values of a table?

a)

The LIMIT constraint

b)

The CHECK constraint

c)

The VALUE constraint

d)

None of the above is correct.

35.

Which is NOT one of the most common types of SQL CHECK constraints?

a)

System date

b)

Range checks

c)

Lists of values

d)

Comparing one column value to another within the same table

36.

What is an advantage of placing computations in SQL views?

a)

To save users from having to write an expression.

b)

To ensure that the results are consistent.

c)

To accomplish both of the above.

d)

None of the above is correct - computations cannot be placed in a view.

37.

Views constructed from SQL SELECT statements that conform to the SQL-92 standard may not contain:

a)

A. GROUP BY.

b)

B. WHERE.

38.

What is not an advantage of stored procedures?

a)

Greater security

b)

SQL can be optimized

c)

Code sharing

d)

Increased network traffic

39.

A reason for using an SQL view to hide columns is:

a)

to simplify a result only.

b)

to prevent the display of sensitive data only.

c)

to accomplish both of the above.

d)

None of the above are reasons for using an SQL view.

40.

Which of the following is an SQL trigger supported by Oracle?

a)

BEFORE

b)

INSTEAD OF

c)

AFTER

d)

All of the above.

41.

The SQL ALTER statement can be used to:

a)

change the table structure.

b)

change the table data.

c)

add rows to the table.

42.

For what purposes are views used?

a)

To hide columns only

b)

To hide rows only

c)

To hide complicated SQL statements only

d)

All of the above are uses for SQL views.

43.

What is an SQL virtual table that is constructed from other tables?

a)

Just another table

b)

A view

c)

A relation

d)

Query results

44.

When using the SQL INSERT statement:

a)

rows can be modified according to criteria only.

b)

rows cannot be copied in mass from one table to another only.

c)

rows can be inserted into a table only one at a time only.

d)

rows can either be inserted into a table one at a time or in groups.

45.

The SQL statement to create a view is:

a)

CREATE VIEW.

b)

MAKE VIEW.

c)

SELECT VIEW.

d)

INSERT VIEW.

46.

To update an SQL view, the DBMS must be able to associate the column(s) to be updated with:

a)

a particular column in a particular underlying table.

b)

a particular column in a particular row.

c)

a particular row in a particular underlying table.

d)

None of the above is correct.

47.

Which of the following is NOT a type of SQL constraint?

a)

PRIMARY KEY

b)

FOREIGN KEY

c)

ALTERNATE KEY

d)

UNIQUE

48.

A ________ is a program that performs some common action on database data and that is stored in the database.

a)

trigger

b)

stored procedure

c)

pseudofile

d)

None of the above is correct.

49.

For what purposes are views used?

a)

To hide columns only

b)

To hide rows only

c)

To hide complicated SQL statements only

d)

All of the above are uses for SQL views.

50.

What is an SQL virtual table that is constructed from other tables?

a)

Just another table

b)

A view

c)

A relation

d)

Query results

51.

When using the SQL INSERT statement:

a)

rows can be modified according to criteria only.

b)

rows cannot be copied in mass from one table to another only.

c)

rows can be inserted into a table only one at a time only.

d)

rows can either be inserted into a table one at a time or in groups.

52.

What is not an advantage of stored procedures?

a)

Greater security

b)

SQL can be optimized

c)

Code sharing

d)

Increased network traffic

53.

A reason for using an SQL view to hide columns is:

a)

to simplify a result only.

b)

to prevent the display of sensitive data only.

c)

to accomplish both of the above.

d)

None of the above are reasons for using an SQL view.

54.

Which of the following is an SQL trigger supported by Oracle?

a)

BEFORE

b)

INSTEAD OF

c)

AFTER

d)

All of the above.

55.

The SQL ALTER statement can be used to:

a)

change the table structure.

b)

change the table data.

c)

add rows to the table.

d)

delete rows from the table.

56.

What SQL structure is used to limit column values of a table?

a)

The LIMIT constraint

b)

The CHECK constraint

c)

The VALUE constraint

d)

None of the above is correct.

57.

Which is NOT one of the most common types of SQL CHECK constraints?

a)

System date

b)

Range checks

c)

Lists of values

d)

Comparing one column value to another within the same table

58.

What is an advantage of placing computations in SQL views?

a)

To save users from having to write an expression.

b)

To ensure that the results are consistent.

c)

To accomplish both of the above.

d)

None of the above is correct - computations cannot be placed in a view.

59.

Views constructed from SQL SELECT statements that conform to the SQL-92 standard may not contain:

a)

GROUP BY.

b)

WHERE.

c)

ORDER BY.

d)

FROM.

60.

A data warehouse uses:

a)

partial operational data.

b)

historical operational data.

c)

future operational data.

d)

health care data.

61.

Metadata enables database designers and users to do all of the following except:

a)

A. sample data.

b)

B. understand what data exist.

c)

C. what the fine distinctions are between similar data items.

d)

D. what the data mean.

62.

Duplicate data often results in loss of data integrity because:

a)

the data formats may be inconsistent.

b)

data values may not agree.

c)

Both A & B.

d)

Neither A & B.

63.

Legacy data is which of the following?

a)

Data contained in a database

b)

Data rejected during the installation of a new system

c)

Data contained in a file system

d)

Data contained by a system used prior to the installation of a new system

64.

A database management system (DBMS) is a:

a)

hardware system used to create, maintain, and provide controlled access to a database.

b)

hardware system used to create, maintain, and provide uncontrolled access to a database.

c)

software system used to create, maintain, and provide controlled access to a database.

d)

software system used to create, maintain, and provide uncontrolled access to a database.

65.

A database application can perform which of the following activities?

a)

Add records

b)

Read records

c)

Update records

d)

All of the above.

66.

An enterprise data model is:

a)

a graphical model that shows the high-level entities for an organization.

b)

a graphical model that shows all entities for an organization.

c)

a non-graphical model that shows the high-level entities for an organization.

d)

a non-graphical model that shows the all entities for an organization.

67.

A shared database should:

a)

be accurate and available.

b)

provide for backup and recovery.

c)

be secure.

d)

All of the above.

68.

Data administrators are responsible for:

a)

physical database design.

b)

managing technical issues in the database environment.

c)

overall management of data resources in an organization.

d)

writing application programs.

69.

Which of the following types of databases are the most common?

a)

Personal

b)

Workgroup

c)

Department

d)

Enterprise

70.

Which of the following is true for a relational database?

a)

Data is represented by tables.

b)

It is difficult to access data.

c)

Complex programs have to be written for simple queries.

d)

All of the above.

71.

Some advantages of the database approach include all, but:

a)

minimal data redundancy.

b)

improved data consistency.

c)

improved data sharing.

d)

program-data dependency.

72.

An enterprise database is which of the following?

a)

A database designed to support only users external to an organization

b)

A database designed to support an entire organization

c)

A database designed to support a relatively small group

d)

A database designed to support a single PC

73.

Structured data may include which of the following?

a)

Photo image

b)

Video clip

c)

Dates

d)

None of the above.

74.

An extranet is which of the following?

a)

The use of Internet protocols with limited access to company data by the company's customers and suppliers.

b)

The use of Internet protocols with unlimited access to company data by the company's customers and suppliers.

c)

The use of Internet protocols with limited access to company data by people within an organization.

d)

The use of Internet protocols with unlimited access to company data by people within an organization.