Database

Database

Advanced SQL has 29 Questions

What type of join is needed when you wish to include rows that do not have matching values?

Equi-join
Natural join
Outer join
All of the above.
Triggers are stored blocks of code that have to be called in order to operate.

True
False
What type of join is needed when you wish to return rows that do have matching values?

Equi-join
Natural join
Outer join
All of the above.
The joining technique is useful when data from several relations are to be retrieved and displayed and the relationships are not necessarily nested.

True
False
Which of the following is true concerning a procedure?

You do not create them with SQL.
They do not need to have a unique name.
They include procedural and SQL statements.
They are the same thing as a function.
There should be one condition within the WHERE clause for each pair of tables being joined.

True
False
A CASE SQL statement is which of the following?

A way to establish an IF-THEN-ELSE in SQL.
A way to establish a loop in SQL.
A way to establish a data definition in SQL.
All of the above.
Subqueries can be nested multiple times.

True
False
Which of the following statements is true concerning routines and triggers?

Both consist of procedural code.
Both have to be called to operate.
Both run automatically.
Both are stored in the database.
The code to create triggers and routines is stored in only one location and is administered centrally.

True
False
Which of the following is one of the basic approaches for joining tables?

Subqueries
Union Join
Natural join
All of the above
A transaction is the complete set of closely related update commands that must all be done, or none of them done, for the database to remain valid.

True
False
Which of the following is true concerning systems information in an RDBMS?

RDBMS store database definition information in system-created tables.
This information can be accessed using SQL.
This information often cannot be updated by a user.
All of the above.
When AUTOCOMMIT is set on, changes will be made automatically at the end of each SQL statement.

True
False
The following SQL is which type of join: SELECT CUSTOMER_T. CUSTOMER_ID, ORDER_T. CUSTOMER_ID, NAME, ORDER_ID FROM CUSTOMER_T,ORDER_T WHERE CUSTOMER_T. CUSTOMER_ID = ORDER_T. CUSTOMER_ID

Equi-join
Natural join
Outer join
Cartesian join
The UNION clause is used to combine the output from multiple queries together into a single result table.

True
False
Embedded SQL is which of the following?

Hard-coded SQL statements in a program language such as Java.
The process of making an application capable of generating specific SQL code on the fly.
Hard-coded SQL statements in a procedure.
Hard-coded SQL statements in a trigger.
ROLLBACK WORK asks SQL to empty the log file.

True
False
A UNION query is which of the following?

Combines the output from no more than two queries and must include the same number of columns.
Combines the output from no more than two queries and does not include the same number of columns.
Combines the output from multiple queries and must include the same number of columns.
Combines the output from multiple queries and does not include the same number of columns.
The most frequently used relational operation, which brings together data from two or more related tables into one resultant table, is called an equi-join.

True
False
Which of the following statements is true concerning subqueries?

Involves the use of an inner and outer query.
Cannot return the same result as a query that is not a subquery.
Does not start with the word SELECT.
All of the above.
Outer join is the same as equi-join, except one of the duplicate columns is eliminated in the result table.

True
False
Which of the following is a correlated subquery?

Uses the result of an inner query to determine the processing of an outer query.
Uses the result of an outer query to determine the processing of an inner query.
Uses the result of an inner query to determine the processing of an inner query.
Uses the result of an outer query to determine the processing of an outer query.
A correlated subquery is where the outer query depends on data from the inner query.

True
False
How many tables may be included with a join?

One
Two
Three
All of the above.
A function returns one value and has only output parameters.

True
False
The following SQL is which type of join: SELECT CUSTOMER_T. CUSTOMER_ID, ORDER_T. CUSTOMER_ID, NAME, ORDER_ID FROM CUSTOMER_T,ORDER_T ;

Equi-join
Natural join
Outer join
Cartesian join
With the UNION clause, each query involved must output the same number of columns, and they must be UNION compatible.

True
False
Which of the following is true concerning triggers?

You do not create them with SQL.
They execute against only some applications that access a database.
They have an event, condition, and action.
They cannot cascade (cause another trigger to fire).