exam 4 questions

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

In which of the following situations would one have to use an outer join in order to obtain the desired results?

A report is desired that lists all customers and the total of their orders during the most recent month, and includes customers who did not place an order during the month (their total will be zero).

is used to generate appropriate SQL code on the fly as an application is processing.

Dynamic SQL

allows one to combine the INSERT and UPDATE operations.

MERGE command

A new set of analytical functions added in SQL:2008 is referred to as:

OLAP functions.

The ________ operator is used to combine the output from multiple queries into a single result table.

UNION

A join in which the joining condition is based on equality between values in the common columns is called a(n):

both equi-join and natural join.

A procedure is:

called, by name

There is a special operation in SQL to join a table to itself.

false

User-defined functions can improve system performance because they will be processed as sets rather than individually, thus reducing system overhead.

false

An interactive command that can be used to dynamically control a user session for appropriate integrity measures is:

set autocommit.

All of the following are guidelines for better query design EXCEPT:

use a lot of self-joins.

RANK and DENSE-RANK are examples of:

window functions.

________ use the result of the outer query to determine the processing of the inner query.

Correlated subqueries

causes two tables with a common domain to be combined into a single table or view.

join operation

Explicit commands to manage transactions are needed when:

multiple SQL commands must be run as part of a transaction.

A join that is based upon equality between values in two common columns with the same name and where one duplicate column has been removed is called a(n):

natural join

The most commonly used form of join operation is the:

natural join

While triggers run automatically, ________ do not and have to be called.

routines

SQL provides the ________ technique, which involves placing an inner query within the WHERE or HAVING clause of an outer query.

subquery

A type of query that is placed within a WHERE or HAVING clause of another query is called a:

subquery.

A named set of SQL statements that are considered when a data modification occurs are called:

triggers

A join in which the joining condition is based on equality between values in the common column is called an equi-join.

true

A procedure is run by calling it by its name.

true

Constraints are a special case of triggers.

true

Figuring out what attributes you want in your query before you write the query will help with query writing.

true

Joining tables or using a subquery may produce the same result.

true

RDBMSs store database definition information in system-created tables which can be considered a data dictionary.

true

SQL statements can be included in another language, such as C or Java.

true

The UNION clause is used to combine the output from multiple queries into a single result table.

true

User-defined data types:

can have defined functions and methods.

In order for two queries to be UNION-compatible, they must:

both output compatible data types for each column and return the same number of rows.

In SQL, a(n) ________ subquery is a type of subquery in which processing the inner query depends on data from the outer query.

correlated

A ________ is a temporary table used in the FROM clause of an SQL query.

derived table

________ takes a value of TRUE if a subquery returns an intermediate results table which contains one or more rows.

exists

A function has only input parameters but can return multiple values.

false

An equi-join is a join in which one of the duplicate columns is eliminated in the result table.

false

EXISTS takes a value of false if the subquery returns an intermediate result set.

false

It is better not to have a result set identified before writing GROUP BY and HAVING clauses for a query.

false

A join in which rows that do not have matching values in common columns are still included in the result table is called a(n):

outer join.

All of the following are advantages of SQL-invoked routines EXCEPT:

security

A type of join where a table is joined to itself is called a(n):

self-join

An operation to join a table to itself is called a(n):

self-join

All of the following are new data types added in SQL:2008 EXCEPT:

BIT.

Extensions defined in SQL-99 that include the capability to create and drop modules of code stored in the database schema across user sessions are called:

Persistent Stored Modules.

MULTISET is similar to the table datatype.

false

Specifying the attribute names in the SELECT statement will make it easier to find errors in queries and also correct for problems that may occur in the base system.

false

Triggers can be used to ensure referential integrity, enforce business rules, create audit trails and replicate tables, but cannot call other triggers.

false

Using an outer join produces this information: rows that do not have matching values in common columns are not included in the result table.

false

Triggers have three parts: the event, the condition, and the action.

true

The outer join syntax does not apply easily to a join condition of more than ________ tables.

two

combine the output from multiple queries into a single result table.

union clause


Ensembles d'études connexes

ch. 13 Palliative and End of Life Care

View Set

Unit 3 - Incorrect (Types of Debt Securities)

View Set

PrepU Query Quiz: Perfusion: Preeclampsia

View Set

Hematology Rosh Review/Smarty Pance (in progress question 8 on rosh review first heme assigned)

View Set

Apologia Biology Module 8 Study Guide

View Set

Scarcity and the Factors of Production

View Set