Deck 5: Introduction to SQL

Full screen (f)
exit full mode
Question
The ________ is the structure that contains descriptions of objects such as tables and views created by users.

A) SQL
B) schema
C) catalog
D) master view
Use Space or
up arrow
down arrow
to flip the card.
Question
________ is a set of commands used to update and query a database.

A) DML
B) DDL
C) DCL
D) DPL
Question
Relational databases are heavily based on the mathematical concept of:

A) set theory.
B) bet theory.
C) get theory.
D) met theory.
Question
Given a table named store with 5 fields: store_id, address, city, state, zipcode, why would the following insert command not work?
INSERT INTO store values ('234 Park Street')

A) It would work just fine.
B) You must specify the fields to insert if you are only inserting some of the fields.
C) There is no table keyword.
D) INSERT INTO should be INSERT to.
Question
The SQL command ________ adds one or more new columns to a table.

A) CREATE TABLE
B) ALTER TABLE
C) CREATE VIEW
D) CREATE RELATIONSHIP
Question
INSERT INTO is an example of ________ code.

A) DDL
B) DML
C) DCL
D) TIO
Question
The command for removing a table is:

A) CREATE TABLE.
B) REMOVE TABLE.
C) DROP TABLE.
D) TRUNCATE TABLE.
Question
What does the following SQL statement do?
UPDATE Product_T
SET Unit_Price = 775
WHERE Product_ID = 7

A) Changes the price of a unit called Product_T to 7
B) Changes the unit price of Product 7 to 775
C) Changes the length of the Unit_Price field to 775
D) Updates the Product_T table to have a unit price of 775
Question
Which of the following is a technique for optimizing the internal performance of the relational data model?

A) Avoiding indexes on secondary keys
B) Clustering data
C) Not reporting statistics to save machine resources
D) Using random index organizations
Question
Any create command may be reversed by using a(n) ________ command.

A) undo
B) drop
C) delete
D) unpack
Question
DDL is typically used during which phase of the development process?

A) Implementation
B) Physical design
C) Analysis
D) Evaluation
Question
The command for creating a database is:

A) CREATE TABLE.
B) CREATE VIEW.
C) CREATE SCHEMA.
D) CREATE AUTHORIZATION.
Question
________ is a set of commands used to control a database, including security.

A) DML
B) DDL
C) DCL
D) DPL
Question
What does the following SQL statement do? ALTER TABLE Customer_T
ADD (Type Varchar (2));

A) Alters the Customer_T table to accept Type 2 Varchars
B) Alters the Customer_T table to be a Type 2 Varchar
C) Alters the Customer_T table by adding a field called "Type"
D) Alters the Customer_T table by adding a 2-byte field called "Varchar"
Question
In an SQL statement, which of the following parts states the conditions for row selection?

A) SELECT
B) FROM
C) WHERE
D) GROUP BY
Question
What does the following SQL statement do?
DELETE FROM Customer_T
WHERE state = 'HI';

A) Deletes all records from Customer_t where the state is equal to HI
B) Removes the Customer_T table from the database
C) Deletes all records from the Customer_T table
D) Doesn't delete anything because of a syntax error
Question
The main concept of relational databases was published in 1970 by:

A) Itzak Ben-Gan.
B) Hoffer.
C) Mills.
D) E.F.Codd.
Question
What does the following SQL command do?
INSERT INTO Customer_T values (001,'John Smith','231 West St','Boston','MA','02115');

A) Adds a new record to the Customer_T table
B) Creates the Customer_T table
C) Deletes the Customer_T table
D) Updates the Customer_T table
Question
The first in a series of steps to follow when creating a table is to:

A) identify columns that must be unique.
B) identify each attribute and its characteristics.
C) create an index.
D) identify columns that must be null.
Question
Indexes are created in most RDBMSs to:

A) provide a quicker way to store data.
B) decrease the amount of disk space utilized.
C) provide rapid random and sequential access to base-table data.
D) increase the cost of implementation.
Question
What will be returned when the following SQL statement is executed? SELECT driver_no,count(*) as num_deliveries
FROM deliveries
GROUP BY driver_no;

A) A listing of all drivers, sorted by driver number
B) A listing of each driver as well as the number of deliveries that he or she has made
C) A count of all of the deliveries made by all drivers
D) An error message
Question
To get all the customers from Hawaii sorted together, which of the following would be used?

A) Order By
B) Group By
C) Having
D) Sort
Question
A single value returned from an SQL query that includes an aggregate function is called a(n):

A) agate.
B) scalar aggregate.
C) vector aggregate.
D) summation.
Question
Which of the following is the wildcard operator in SQL statements?

A) < >
B) *
C) =
D) &
Question
Which of the following counts ONLY rows that contain a value?

A) COUNT
B) COUNT(*)
C) TALLY(*)
D) CHECKNUM
Question
What result set is returned from the following query?
SELECT Customer_Name, telephone
FROM customers
WHERE city in ('Boston','New York','Denver');

A) The Customer_Name and telephone of all customers
B) The Customer_Name and telephone of all customers living in either Boston, New York or Denver
C) The Customer_Name and telephone of all customers living in Boston and New York and Denver
D) The Customer_Name of all customers living in Boston, New York or Denver
Question
Which of the following questions is answered by the SQL statement?
SELECT COUNT (Product_Description) FROM Product_T;

A) How many products are in the table Product_T?
B) How many products have product descriptions in the Product Table?
C) How many characters are in the field name "Product_Description"?
D) How many different columns named "Product_Description" are there in table Product_T?
Question
Which of the following can produce scalar and vector aggregates?

A) Order By
B) Group By
C) Having
D) Sort
Question
What results will be produced by the following SQL query?
SELECT SUM(Standard_Price) as Total_Price
From Product_V
Where Product_Type = 'WOOD';

A) The total price of all products that are of type wood
B) The total price of all products
C) The Standard_Price of the first wood product in the table
D) The Standard_Price of any wood product in the table
Question
To eliminate duplicate rows in a query, the ________ qualifier is used in the SQL Select command.

A) ALTER
B) DISTINCT
C) CHECK
D) SPECIFIC
Question
The last part of an SQL query to be read is the ________ statement.

A) SELECT
B) FROM
C) WHERE
D) ORDER BY
Question
What will be returned when the following SQL statement is executed?
SELECT driver_no, count(*) as num_deliveries
FROM deliveries
WHERE state = 'MA'
GROUP BY driver_no;

A) A listing of all drivers who made deliveries to state = 'MA', sorted by driver number
B) A listing of each driver who made deliveries to state = 'MA' as well as the number of deliveries that each driver has made to that state
C) A count of all of the deliveries made to state = 'MA' by all drivers
D) An error message will be generated
Question
What result will the following SQL statement produce?
SELECT Avg(Standard_Price) as average from Product_V;

A) The average of all products in Product_V
B) The average Standard_Price of all products in Product_V
C) The average price of all products
D) The mode of all prices
Question
What will result from the following SQL Select statement?
SELECT MIN(Product_Description)
FROM Product_V;

A) The minimum value of Product_Description will be displayed.
B) An error message will be generated.
C) The first product description alphabetically in Product_V will be shown.
D) SELECT @ will be displayed.
Question
What result set will the following query return?
SELECT Item_No, description
FROM item
WHERE weight > 100 and weight < 200;

A) The Item_No and description for all items weighing less than 100
B) The Item_No for all items weighing between 101 and 199
C) The Item_No and description for all items weighing between 101 and 199
D) The Item_No for all items weighing more than 200
Question
What result set will the following query return?
SELECT Item_No
FROM Order_V
WHERE quantity > 10;

A) The Item_No of all orders that had more than 10 items
B) The Order_Id of all orders that had more than one item
C) The Order_Id of all orders that had more than 10 items
D) The Item_No of all orders that had 10 or more items
Question
The first part of an SQL query to be read is the ________ statement.

A) SELECT
B) FROM
C) WHERE
D) ORDER BY
Question
What does the following SQL statement do?
SELECT * From Customer WHERE Cust_Type = "Best"

A) Selects all the fields from the Customer table for each row with a customer labeled "Best"
B) Selects the "*" field from the Customer table for each row with a customer labeled "Best"
C) Selects fields with a "*" in them from the Customer table
D) Selects all the fields from the Customer table for each row with a customer labeled "*"
Question
Which of the following will produce the minimum of all standard prices?

A) SELECT Standard_Price FROM Product_V WHERE Standard_Price = min;
B) SELECT MIN(Standard_Price) FROM Product_V;
C) SELECT Standard_Price FROM min(Product_V);
D) SELECT MIN(Standard_Price) FROM Product_V WHERE Standard_Price = min(Standard_Price);
Question
Multiple values returned from an SQL query that includes an aggregate function are called:

A) vector aggregates.
B) scalar aggregates.
C) agates.
D) summations.
Question
A database table is defined using the data definition language (DDL).
Question
A view may not be updated directly if it contains:

A) the SELECT clause.
B) the HAVING clause.
C) the FROM clause.
D) the WHERE clause.
Question
The CREATE SCHEMA DDL command is used to create a table.
Question
A catalog is the structure that contains object descriptions created by a user.
Question
When the SELECT clause in the create view statement contains the keyword DISTINCT, the view can be used to update data.
Question
The content of dynamic views is generated when they are referenced.
Question
What will be returned when the following SQL query is executed?
SELECT driver_no, COUNT(*) as num_deliveries
FROM deliveries
GROUP BY driver_no
HAVING COUNT(*) > 2;

A) A listing of all drivers who made more than 2 deliveries as well as a count of the number of deliveries
B) A listing of all drivers
C) A listing of the number of deliveries greater than 2
D) A listing of all drivers who made more than 2 deliveries
Question
Which of the following finds all groups meeting stated conditions?

A) SELECT
B) WHERE
C) HAVING
D) FIND
Question
A major benefit of SQL as a standard is reduced training costs.
Question
Requiring a CustomerID to exist in a Primary table before it can exist in a foreign table is an example of:

A) referential referring.
B) referential integrity.
C) ethical integrity.
D) the Hoffer Principle.
Question
Which of the following is a purpose of the SQL standard?

A) To specify syntax and semantics of SQL data definition and manipulation languages
B) To specify maximum and incomplete standards
C) To define every operation for every SQL database
D) To permit no degrees of freedom for SQL DBMS
Question
SQL is both an American and international standard for database access.
Question
SQL has been implemented only in the mainframe and midrange environments.
Question
The views are created by executing a CREATE VIEW SQL command.
Question
Which of the following is true of the order in which SQL statements are evaluated?

A) The SELECT clause is always processed first.
B) The SELECT clause is always processed last.
C) The SELECT clause is processed before the ORDER BY clause.
D) The GROUP BY clause is processed before the WHERE clause.
Question
SQL originated from a project called System-S.
Question
DCL is used to update the database with new records.
Question
A database is maintained and queried using the data mapping language (DML).
Question
The benefits of a standardized relational language include:

A) application turnover.
B) increased training costs.
C) cross-system communication.
D) confusing the SQL programmers.
Question
One of the original purposes of the SQL standard was to provide a vehicle for portability of database definition and application modules between conforming DBMSs.
Question
Expressions are mathematical manipulations of data in a table that may be included as part of the SELECT statement.
Question
The DROP command deletes rows from a table individually or in groups.
Question
Implementation of a standard can never stifle creativity and innovation.
Question
The following two SQL statements will produce the same results.
SELECT last_name, first_name
FROM customer
WHERE credit_limit > 99 AND credit_limit < 10001;

SELECT last_name, first_name
FROM customer
WHERE credit_limit BETWEEN 100 and 10000;
Question
If multiple Boolean operators are used in an SQL statement, NOT is evaluated first, then AND, then OR.
Question
The following INSERT command would work fine:
INSERT INTO budget values 121,222,111;
Question
In order to update data in SQL, one must inform the DBMS which relation, columns, and rows are involved.
Question
An INSERT command does not need to have the fields listed.
Question
Applications can be moved from one machine to another when each machine uses SQL.
Question
When creating tables, it's important to decide which columns will allow null values before the table is created.
Question
The comparison operators = and != are used to establish a range of values.
Question
COUNT(*) tallies only those rows that contain a value, while COUNT counts all rows.
Question
The SQL command used to populate tables is the INSERT command.
Question
Indexes generally slow down access speed in most RDMS.
Question
Some DBMS can handle graphic data types as well as text and numbers.
Question
Adding the DISTINCT keyword to a query eliminates duplicates.
Question
The asterisk (*) wildcard designator can be used to select all fields from a table as well as in WHERE clauses when an exact match is not possible.
Question
The ALTER TABLE command is used to change a table definition.
Question
The DELETE TABLE DDL command is used to remove a table from the database.
Question
In databases, null values are equivalent to zero.
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/102
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 5: Introduction to SQL
1
The ________ is the structure that contains descriptions of objects such as tables and views created by users.

A) SQL
B) schema
C) catalog
D) master view
B
2
________ is a set of commands used to update and query a database.

A) DML
B) DDL
C) DCL
D) DPL
A
3
Relational databases are heavily based on the mathematical concept of:

A) set theory.
B) bet theory.
C) get theory.
D) met theory.
A
4
Given a table named store with 5 fields: store_id, address, city, state, zipcode, why would the following insert command not work?
INSERT INTO store values ('234 Park Street')

A) It would work just fine.
B) You must specify the fields to insert if you are only inserting some of the fields.
C) There is no table keyword.
D) INSERT INTO should be INSERT to.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
5
The SQL command ________ adds one or more new columns to a table.

A) CREATE TABLE
B) ALTER TABLE
C) CREATE VIEW
D) CREATE RELATIONSHIP
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
6
INSERT INTO is an example of ________ code.

A) DDL
B) DML
C) DCL
D) TIO
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
7
The command for removing a table is:

A) CREATE TABLE.
B) REMOVE TABLE.
C) DROP TABLE.
D) TRUNCATE TABLE.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
8
What does the following SQL statement do?
UPDATE Product_T
SET Unit_Price = 775
WHERE Product_ID = 7

A) Changes the price of a unit called Product_T to 7
B) Changes the unit price of Product 7 to 775
C) Changes the length of the Unit_Price field to 775
D) Updates the Product_T table to have a unit price of 775
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
9
Which of the following is a technique for optimizing the internal performance of the relational data model?

A) Avoiding indexes on secondary keys
B) Clustering data
C) Not reporting statistics to save machine resources
D) Using random index organizations
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
10
Any create command may be reversed by using a(n) ________ command.

A) undo
B) drop
C) delete
D) unpack
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
11
DDL is typically used during which phase of the development process?

A) Implementation
B) Physical design
C) Analysis
D) Evaluation
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
12
The command for creating a database is:

A) CREATE TABLE.
B) CREATE VIEW.
C) CREATE SCHEMA.
D) CREATE AUTHORIZATION.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
13
________ is a set of commands used to control a database, including security.

A) DML
B) DDL
C) DCL
D) DPL
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
14
What does the following SQL statement do? ALTER TABLE Customer_T
ADD (Type Varchar (2));

A) Alters the Customer_T table to accept Type 2 Varchars
B) Alters the Customer_T table to be a Type 2 Varchar
C) Alters the Customer_T table by adding a field called "Type"
D) Alters the Customer_T table by adding a 2-byte field called "Varchar"
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
15
In an SQL statement, which of the following parts states the conditions for row selection?

A) SELECT
B) FROM
C) WHERE
D) GROUP BY
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
16
What does the following SQL statement do?
DELETE FROM Customer_T
WHERE state = 'HI';

A) Deletes all records from Customer_t where the state is equal to HI
B) Removes the Customer_T table from the database
C) Deletes all records from the Customer_T table
D) Doesn't delete anything because of a syntax error
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
17
The main concept of relational databases was published in 1970 by:

A) Itzak Ben-Gan.
B) Hoffer.
C) Mills.
D) E.F.Codd.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
18
What does the following SQL command do?
INSERT INTO Customer_T values (001,'John Smith','231 West St','Boston','MA','02115');

A) Adds a new record to the Customer_T table
B) Creates the Customer_T table
C) Deletes the Customer_T table
D) Updates the Customer_T table
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
19
The first in a series of steps to follow when creating a table is to:

A) identify columns that must be unique.
B) identify each attribute and its characteristics.
C) create an index.
D) identify columns that must be null.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
20
Indexes are created in most RDBMSs to:

A) provide a quicker way to store data.
B) decrease the amount of disk space utilized.
C) provide rapid random and sequential access to base-table data.
D) increase the cost of implementation.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
21
What will be returned when the following SQL statement is executed? SELECT driver_no,count(*) as num_deliveries
FROM deliveries
GROUP BY driver_no;

A) A listing of all drivers, sorted by driver number
B) A listing of each driver as well as the number of deliveries that he or she has made
C) A count of all of the deliveries made by all drivers
D) An error message
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
22
To get all the customers from Hawaii sorted together, which of the following would be used?

A) Order By
B) Group By
C) Having
D) Sort
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
23
A single value returned from an SQL query that includes an aggregate function is called a(n):

A) agate.
B) scalar aggregate.
C) vector aggregate.
D) summation.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
24
Which of the following is the wildcard operator in SQL statements?

A) < >
B) *
C) =
D) &
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
25
Which of the following counts ONLY rows that contain a value?

A) COUNT
B) COUNT(*)
C) TALLY(*)
D) CHECKNUM
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
26
What result set is returned from the following query?
SELECT Customer_Name, telephone
FROM customers
WHERE city in ('Boston','New York','Denver');

A) The Customer_Name and telephone of all customers
B) The Customer_Name and telephone of all customers living in either Boston, New York or Denver
C) The Customer_Name and telephone of all customers living in Boston and New York and Denver
D) The Customer_Name of all customers living in Boston, New York or Denver
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
27
Which of the following questions is answered by the SQL statement?
SELECT COUNT (Product_Description) FROM Product_T;

A) How many products are in the table Product_T?
B) How many products have product descriptions in the Product Table?
C) How many characters are in the field name "Product_Description"?
D) How many different columns named "Product_Description" are there in table Product_T?
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
28
Which of the following can produce scalar and vector aggregates?

A) Order By
B) Group By
C) Having
D) Sort
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
29
What results will be produced by the following SQL query?
SELECT SUM(Standard_Price) as Total_Price
From Product_V
Where Product_Type = 'WOOD';

A) The total price of all products that are of type wood
B) The total price of all products
C) The Standard_Price of the first wood product in the table
D) The Standard_Price of any wood product in the table
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
30
To eliminate duplicate rows in a query, the ________ qualifier is used in the SQL Select command.

A) ALTER
B) DISTINCT
C) CHECK
D) SPECIFIC
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
31
The last part of an SQL query to be read is the ________ statement.

A) SELECT
B) FROM
C) WHERE
D) ORDER BY
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
32
What will be returned when the following SQL statement is executed?
SELECT driver_no, count(*) as num_deliveries
FROM deliveries
WHERE state = 'MA'
GROUP BY driver_no;

A) A listing of all drivers who made deliveries to state = 'MA', sorted by driver number
B) A listing of each driver who made deliveries to state = 'MA' as well as the number of deliveries that each driver has made to that state
C) A count of all of the deliveries made to state = 'MA' by all drivers
D) An error message will be generated
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
33
What result will the following SQL statement produce?
SELECT Avg(Standard_Price) as average from Product_V;

A) The average of all products in Product_V
B) The average Standard_Price of all products in Product_V
C) The average price of all products
D) The mode of all prices
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
34
What will result from the following SQL Select statement?
SELECT MIN(Product_Description)
FROM Product_V;

A) The minimum value of Product_Description will be displayed.
B) An error message will be generated.
C) The first product description alphabetically in Product_V will be shown.
D) SELECT @ will be displayed.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
35
What result set will the following query return?
SELECT Item_No, description
FROM item
WHERE weight > 100 and weight < 200;

A) The Item_No and description for all items weighing less than 100
B) The Item_No for all items weighing between 101 and 199
C) The Item_No and description for all items weighing between 101 and 199
D) The Item_No for all items weighing more than 200
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
36
What result set will the following query return?
SELECT Item_No
FROM Order_V
WHERE quantity > 10;

A) The Item_No of all orders that had more than 10 items
B) The Order_Id of all orders that had more than one item
C) The Order_Id of all orders that had more than 10 items
D) The Item_No of all orders that had 10 or more items
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
37
The first part of an SQL query to be read is the ________ statement.

A) SELECT
B) FROM
C) WHERE
D) ORDER BY
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
38
What does the following SQL statement do?
SELECT * From Customer WHERE Cust_Type = "Best"

A) Selects all the fields from the Customer table for each row with a customer labeled "Best"
B) Selects the "*" field from the Customer table for each row with a customer labeled "Best"
C) Selects fields with a "*" in them from the Customer table
D) Selects all the fields from the Customer table for each row with a customer labeled "*"
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
39
Which of the following will produce the minimum of all standard prices?

A) SELECT Standard_Price FROM Product_V WHERE Standard_Price = min;
B) SELECT MIN(Standard_Price) FROM Product_V;
C) SELECT Standard_Price FROM min(Product_V);
D) SELECT MIN(Standard_Price) FROM Product_V WHERE Standard_Price = min(Standard_Price);
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
40
Multiple values returned from an SQL query that includes an aggregate function are called:

A) vector aggregates.
B) scalar aggregates.
C) agates.
D) summations.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
41
A database table is defined using the data definition language (DDL).
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
42
A view may not be updated directly if it contains:

A) the SELECT clause.
B) the HAVING clause.
C) the FROM clause.
D) the WHERE clause.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
43
The CREATE SCHEMA DDL command is used to create a table.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
44
A catalog is the structure that contains object descriptions created by a user.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
45
When the SELECT clause in the create view statement contains the keyword DISTINCT, the view can be used to update data.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
46
The content of dynamic views is generated when they are referenced.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
47
What will be returned when the following SQL query is executed?
SELECT driver_no, COUNT(*) as num_deliveries
FROM deliveries
GROUP BY driver_no
HAVING COUNT(*) > 2;

A) A listing of all drivers who made more than 2 deliveries as well as a count of the number of deliveries
B) A listing of all drivers
C) A listing of the number of deliveries greater than 2
D) A listing of all drivers who made more than 2 deliveries
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
48
Which of the following finds all groups meeting stated conditions?

A) SELECT
B) WHERE
C) HAVING
D) FIND
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
49
A major benefit of SQL as a standard is reduced training costs.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
50
Requiring a CustomerID to exist in a Primary table before it can exist in a foreign table is an example of:

A) referential referring.
B) referential integrity.
C) ethical integrity.
D) the Hoffer Principle.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
51
Which of the following is a purpose of the SQL standard?

A) To specify syntax and semantics of SQL data definition and manipulation languages
B) To specify maximum and incomplete standards
C) To define every operation for every SQL database
D) To permit no degrees of freedom for SQL DBMS
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
52
SQL is both an American and international standard for database access.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
53
SQL has been implemented only in the mainframe and midrange environments.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
54
The views are created by executing a CREATE VIEW SQL command.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
55
Which of the following is true of the order in which SQL statements are evaluated?

A) The SELECT clause is always processed first.
B) The SELECT clause is always processed last.
C) The SELECT clause is processed before the ORDER BY clause.
D) The GROUP BY clause is processed before the WHERE clause.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
56
SQL originated from a project called System-S.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
57
DCL is used to update the database with new records.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
58
A database is maintained and queried using the data mapping language (DML).
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
59
The benefits of a standardized relational language include:

A) application turnover.
B) increased training costs.
C) cross-system communication.
D) confusing the SQL programmers.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
60
One of the original purposes of the SQL standard was to provide a vehicle for portability of database definition and application modules between conforming DBMSs.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
61
Expressions are mathematical manipulations of data in a table that may be included as part of the SELECT statement.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
62
The DROP command deletes rows from a table individually or in groups.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
63
Implementation of a standard can never stifle creativity and innovation.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
64
The following two SQL statements will produce the same results.
SELECT last_name, first_name
FROM customer
WHERE credit_limit > 99 AND credit_limit < 10001;

SELECT last_name, first_name
FROM customer
WHERE credit_limit BETWEEN 100 and 10000;
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
65
If multiple Boolean operators are used in an SQL statement, NOT is evaluated first, then AND, then OR.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
66
The following INSERT command would work fine:
INSERT INTO budget values 121,222,111;
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
67
In order to update data in SQL, one must inform the DBMS which relation, columns, and rows are involved.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
68
An INSERT command does not need to have the fields listed.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
69
Applications can be moved from one machine to another when each machine uses SQL.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
70
When creating tables, it's important to decide which columns will allow null values before the table is created.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
71
The comparison operators = and != are used to establish a range of values.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
72
COUNT(*) tallies only those rows that contain a value, while COUNT counts all rows.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
73
The SQL command used to populate tables is the INSERT command.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
74
Indexes generally slow down access speed in most RDMS.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
75
Some DBMS can handle graphic data types as well as text and numbers.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
76
Adding the DISTINCT keyword to a query eliminates duplicates.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
77
The asterisk (*) wildcard designator can be used to select all fields from a table as well as in WHERE clauses when an exact match is not possible.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
78
The ALTER TABLE command is used to change a table definition.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
79
The DELETE TABLE DDL command is used to remove a table from the database.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
80
In databases, null values are equivalent to zero.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 102 flashcards in this deck.