NEW
Font size
WorksheetsDBS 3
Total questions: 74
Worksheet time: 37mins
SQL data definition commands make up a(n) ________ .
DDL
DML
HTML
XML
Which of the following is valid SQL for an Index?
CREATE INDEX ID;
CHANGE INDEX ID;
ADD INDEX ID;
REMOVE INDEX ID;
The SQL keyword(s) ________ is used with wildcards.
A. LIKE only
B. IN only
C. NOT IN only
D. IN and NOT IN
Which of the following is the correct order of keywords for SQL SELECT statements?
SELECT, FROM, WHERE
FROM, WHERE, SELECT
WHERE, FROM,SELECT
SELECT,WHERE,FROM
A subquery in an SQL SELECT statement is enclosed in:
braces -- {...}.
CAPITAL LETTERS.
parenthesis -- (...).
brackets -- [...].
The result of a SQL SELECT statement is a(n) ________ .
report
form
file
table
Which of the following are the five built-in functions provided by SQL?
COUNT, SUM, AVG, MAX, MIN
SUM, AVG, MIN, MAX, MULT
SUM, AVG, MULT, DIV, MIN
SUM, AVG, MIN, MAX, NAME
In an SQL SELECT statement querying a single table, according to the SQL-92 standard the asterisk (*) means that:
all columns of the table are to be returned.
all records meeting the full criteria are to be returned.
all records with even partial criteria met are to be returned.
None of the above is correct.
The HAVING clause does which of the following?
Acts like a WHERE clause but is used for groups rather than rows.
Acts like a WHERE clause but is used for rows rather than columns.
Acts like a WHERE clause but is used for columns rather than groups.
Acts EXACTLY like a WHERE clause.
The SQL-92 wildcards are ____ and ____.
asterisk (*); percent sign (%)
percent sign (%); underscore (_)
underscore (_); question mark (?)
question mark (?); asterisk (*)
To remove duplicate rows from the results of an SQL SELECT statement, the ________ qualifier specified must be included.
DISTINCT
Only
UNIQUE
SINGLE
The benefits of a standard relational language include which of the following?
Reduced training costs
Increased dependence on a single vendor
Applications are not needed.
All of the above.
Which of the following do you need to consider when you make a table in SQL?
Data types
Primary keys
Default values
All of the above.
SQL query and modification commands make up a(n) ________ .
DDL
DML
HTML
XML
When three or more AND and OR conditions are combined, it is easier to use the SQL keyword(s):
LIKE only.
IN only.
NOT IN only.
Both IN and NOT IN.
The Microsoft Access wildcards are ____ and ____ .
asterisk (*); percent sign (%)
percent sign (%); underscore (_)
underscore(_); question mark (?)
question mark (?); asterisk (*)
Find the SQL statement below that is equal to the following: SELECT NAME FROM CUSTOMER WHERE STATE = 'VA';
SELECT NAME IN CUSTOMER WHERE STATE IN ('VA');
SELECT NAME IN CUSTOMER WHERE STATE = 'VA';
SELECT NAME IN CUSTOMER WHERE STATE = 'V';
SELECT NAME FROM CUSTOMER WHERE STATE IN ('VA');
Which one of the following sorts rows in SQL?
SORT BY
ALIGN BY
ORDER BY
GROUP BY
To sort the results of a query use:
SORT BY.
GROUP BY.
ORDER BY.
None of the above is correct.
To define what columns should be displayed in an SQL SELECT statement:
use FROM to name the source table(s) and list the columns to be shown after SELECT.
use USING to name the source table(s) and list the columns to be shown after SELECT.
use SELECT to name the source table(s) and list the columns to be shown after USING.
use USING to name the source table(s) and list the columns to be shown after WHERE.
SQL can be used to:
create database structures only.
query database data only.
All of the above can be done by SQL.
modify database data only.
The SQL statement that queries or reads data from a table is ________ .
SELECT
READ
QUERY
None of the above is correct.
The SQL keyword BETWEEN is used:
for ranges.
to limit the columns displayed.
as a wildcard.
None of the above is correct.
A subquery in an SQL SELECT statement:
can only be used with two tables.
can always be duplicated by a join.
has a distinct form that cannot be duplicated by a join
has a distinct form that cannot be duplicated by a join
________ was adopted as a national standard by ANSI in 1992.
Oracle
SQL
Microsoft Access
DBase
SQL is:
a programming language.
an operating system.
a data sublanguage.
a DBMS.
The SQL command to create a table is:
MAKE TABLE.
ALTER TABLE.
DEFINE TABLE.
CREATE TABLE.
A ________ is a stored program that is attached to a table or a view.
pseudofile
embedded SELECT statement
trigger
None of the above is correct.
The DROP TABLE statement:
deletes the table structure only.
deletes the table structure along with the table data.
works whether or not referential integrity constraints would be violated.
is not an SQL statement.
SQL views can be used to hide:
columns and rows only.
complicated SQL syntax only.
both of the above can be hidden by an SQL view.
None of the above is correct.
The SQL statement to create a view is:
CREATE VIEW
MAKE VIEW
SELECT VIEW
INSERT VIEW
To update an SQL view, the DBMS must be able to associate the column(s) to be updated with:
a particular column in a particular underlying table.
a particular column in a particular row.
a particular row in a particular underlying table.
None of the above is correct.
Which of the following is NOT a type of SQL constraint?
PRIMARY KEY
FOREIGN KEY
ALTERNATE KEY
UNIQUE
What SQL structure is used to limit column values of a table?
The LIMIT constraint
The CHECK constraint
The VALUE constraint
None of the above is correct.
Which is NOT one of the most common types of SQL CHECK constraints?
System date
Range checks
Lists of values
Comparing one column value to another within the same table
What is an advantage of placing computations in SQL views?
To save users from having to write an expression.
To ensure that the results are consistent.
To accomplish both of the above.
None of the above is correct - computations cannot be placed in a view.
Views constructed from SQL SELECT statements that conform to the SQL-92 standard may not contain:
A. GROUP BY.
B. WHERE.
What is not an advantage of stored procedures?
Greater security
SQL can be optimized
Code sharing
Increased network traffic
A reason for using an SQL view to hide columns is:
to simplify a result only.
to prevent the display of sensitive data only.
to accomplish both of the above.
None of the above are reasons for using an SQL view.
Which of the following is an SQL trigger supported by Oracle?
BEFORE
INSTEAD OF
AFTER
All of the above.
The SQL ALTER statement can be used to:
change the table structure.
change the table data.
add rows to the table.
For what purposes are views used?
To hide columns only
To hide rows only
To hide complicated SQL statements only
All of the above are uses for SQL views.
What is an SQL virtual table that is constructed from other tables?
Just another table
A view
A relation
Query results
When using the SQL INSERT statement:
rows can be modified according to criteria only.
rows cannot be copied in mass from one table to another only.
rows can be inserted into a table only one at a time only.
rows can either be inserted into a table one at a time or in groups.
The SQL statement to create a view is:
CREATE VIEW.
MAKE VIEW.
SELECT VIEW.
INSERT VIEW.
To update an SQL view, the DBMS must be able to associate the column(s) to be updated with:
a particular column in a particular underlying table.
a particular column in a particular row.
a particular row in a particular underlying table.
None of the above is correct.
Which of the following is NOT a type of SQL constraint?
PRIMARY KEY
FOREIGN KEY
ALTERNATE KEY
UNIQUE
A ________ is a program that performs some common action on database data and that is stored in the database.
trigger
stored procedure
pseudofile
None of the above is correct.
For what purposes are views used?
To hide columns only
To hide rows only
To hide complicated SQL statements only
All of the above are uses for SQL views.
What is an SQL virtual table that is constructed from other tables?
Just another table
A view
A relation
Query results
When using the SQL INSERT statement:
rows can be modified according to criteria only.
rows cannot be copied in mass from one table to another only.
rows can be inserted into a table only one at a time only.
rows can either be inserted into a table one at a time or in groups.
What is not an advantage of stored procedures?
Greater security
SQL can be optimized
Code sharing
Increased network traffic
A reason for using an SQL view to hide columns is:
to simplify a result only.
to prevent the display of sensitive data only.
to accomplish both of the above.
None of the above are reasons for using an SQL view.
Which of the following is an SQL trigger supported by Oracle?
BEFORE
INSTEAD OF
AFTER
All of the above.
The SQL ALTER statement can be used to:
change the table structure.
change the table data.
add rows to the table.
delete rows from the table.
What SQL structure is used to limit column values of a table?
The LIMIT constraint
The CHECK constraint
The VALUE constraint
None of the above is correct.
Which is NOT one of the most common types of SQL CHECK constraints?
System date
Range checks
Lists of values
Comparing one column value to another within the same table
What is an advantage of placing computations in SQL views?
To save users from having to write an expression.
To ensure that the results are consistent.
To accomplish both of the above.
None of the above is correct - computations cannot be placed in a view.
Views constructed from SQL SELECT statements that conform to the SQL-92 standard may not contain:
GROUP BY.
WHERE.
ORDER BY.
FROM.
A data warehouse uses:
partial operational data.
historical operational data.
future operational data.
health care data.
Metadata enables database designers and users to do all of the following except:
A. sample data.
B. understand what data exist.
C. what the fine distinctions are between similar data items.
D. what the data mean.
Duplicate data often results in loss of data integrity because:
the data formats may be inconsistent.
data values may not agree.
Both A & B.
Neither A & B.
Legacy data is which of the following?
Data contained in a database
Data rejected during the installation of a new system
Data contained in a file system
Data contained by a system used prior to the installation of a new system
A database management system (DBMS) is a:
hardware system used to create, maintain, and provide controlled access to a database.
hardware system used to create, maintain, and provide uncontrolled access to a database.
software system used to create, maintain, and provide controlled access to a database.
software system used to create, maintain, and provide uncontrolled access to a database.
A database application can perform which of the following activities?
Add records
Read records
Update records
All of the above.
An enterprise data model is:
a graphical model that shows the high-level entities for an organization.
a graphical model that shows all entities for an organization.
a non-graphical model that shows the high-level entities for an organization.
a non-graphical model that shows the all entities for an organization.
A shared database should:
be accurate and available.
provide for backup and recovery.
be secure.
All of the above.
Data administrators are responsible for:
physical database design.
managing technical issues in the database environment.
overall management of data resources in an organization.
writing application programs.
Which of the following types of databases are the most common?
Personal
Workgroup
Department
Enterprise
Which of the following is true for a relational database?
Data is represented by tables.
It is difficult to access data.
Complex programs have to be written for simple queries.
All of the above.
Some advantages of the database approach include all, but:
minimal data redundancy.
improved data consistency.
improved data sharing.
program-data dependency.
An enterprise database is which of the following?
A database designed to support only users external to an organization
A database designed to support an entire organization
A database designed to support a relatively small group
A database designed to support a single PC
Structured data may include which of the following?
Photo image
Video clip
Dates
None of the above.
An extranet is which of the following?
The use of Internet protocols with limited access to company data by the company's customers and suppliers.
The use of Internet protocols with unlimited access to company data by the company's customers and suppliers.
The use of Internet protocols with limited access to company data by people within an organization.
The use of Internet protocols with unlimited access to company data by people within an organization.
