Final Chapter #7

Ace your homework & exams now with Quizwiz!

) In which of the following situations would one have to use an outer join in order to obtain the desired results? A) A report is desired that lists all customers who placed an order. B) A report is desired that lists all customers and the total of their orders. C) A report is desired that lists all customers, 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). D) There is never a situation that requires only an outer join.

C

A join operation: A) brings together data from two different fields. B) causes two tables with a common domain to be combined into a single table or view. C) causes two disparate tables to be combined into a single table or view. D) is used to combine indexing operations.

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

User-defined data types: A) can be a subclass of a standard type. B) can behave as an object. C) can have defined functions and methods. D) can have all of the above.

can have all of the above

In SQL, a(n) ________ subquery is a type of subquery in which processing the inner query depends on data from the outer query. A) correlated B) paired C) natural D) inner

correlated

________ use the result of the outer query to determine the processing of the inner query. A) Correlated subqueries B) Outer subqueries C) Inner subqueries D) Subqueries

correlated subqueries

A ________ is a temporary table used in the FROM clause of an SQL query. A) correlated subquery B) derived table C) view table D) none of the above

derived table

________ takes a value of true if a subquery returns an intermediate results table which contains one or more rows. A) IN B) HAVING C) EXISTS D) EXTENTS

exists

Embedded SQL consists of: A) hard-coded SQL statements included in a program written in another language. B) SQL encapsulated inside of other SQL statements. C) SQL written into a front-end application. D) SQL translated to a lower-level language.

hard-coded SQL statements included in a program written in another language

One major advantage of the outer join is that: A) information is easily accessible. B) information is not lost. C) the query is easier to write. D) all of the above.

information is not lost

Dynamic SQL: A) is used to generate appropriate SQL code on the fly as an application is processing. B) is quite volatile. C) is not used widely on the Internet. D) creates a less flexible application

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

Explicit commands to manage transactions are needed when: A) a transaction consists of just one SQL command. B) multiple SQL commands must be run as part of a transaction. C) autocommit is set to off. D) none of the above

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): A) equi-join. B) natural join. C) multivariate join. D) inner join

natural join

The most commonly used form of join operation is the: A) outer join. B) union join. C) equi-join. D) natural join.

natural join

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): A) natural join. B) equi-join. C) outer join. D) union join.

outer join

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: A) stored procedures. B) Persistent Stored Modules. C) flow control modules. D) none of the above.

persistent stored modules

While triggers run automatically, ________ do not and have to be called. A) trapdoors B) routines C) selects D) updates

routines

All of the following are advantages of SQL-invoked routines EXCEPT: A) flexibility. B) efficiency. C) sharability. D) security.

security

All of the following are part of the coding structure for triggers EXCEPT: A) event. B) condition. C) selection. D) action.

selection

A type of join where a table is joined to itself is called a(n): A) unary join. B) self-join. C) unnatural join. D) pinned join.

self-join

An operation to join a table to itself is called a: A) sufficient-join. B) inner join. C) outer join. D) self-join.

self-join

An interactive command that can be used to dynamically control a user session for appropriate integrity measures is: A) rollback. B) rollforward. C) set autocommit. D) expunge.

set autocommit

A type of query that is placed within a WHERE or HAVING clause of another query is called a: A) master query. B) subquery. C) superquery. D) multi-query

subquery

SQL provides the ________ technique, which involves placing an inner query within the WHERE or HAVING clause of an outer query. A) grouping B) joining C) subquery D) union

subquery

User-defined transactions can improve system performance because: A) transactions are processed as sets, reducing system overhead. B) transactions are mapped to SQL statements. C) speed is improved due to query optimization. D) all of the above.

transactions are processed as sets, reducing system overhead

A named set of SQL statements that are considered when a data modification occurs are called: A) stored procedures. B) treatments. C) triggers. D) trapdoors.

triggers

EXISTS will take a value of ________ if the subquery returns an intermediate results table which contains one or more rows. A) FALSE B) 1 C) TRUE D) undefined

true

The outer join syntax does not apply easily to a join condition of more than ________ tables. A) two B) three C) four D) any number of

two

The ________ clause is used to combine the output from multiple queries into a single result table. A) INTERSECT B) DIVIDE C) COLLATE D) UNION

union

All of the following are guidelines for better query design EXCEPT: A) understand how indexes are used in query processing. B) use a lot of self-joins. C) write simple queries. D) retrieve on the data that you need.

use a lot of self-joins

Establishing IF-THEN-ELSE logical processing within an SQL statement can be accomplished by: A) using the if-then-else construct. B) using the immediate if statement. C) using the CASE keyword in a statement. D) using a subquery.

using the case keyword in a statement

The UNION clause is used to: A) combine the output from multiple queries into a single result table. B) join two tables together to form one table. C) find all rows that do not match in two tables. D) none of the above.

A

All of the following are new data types added in SQL:200n EXCEPT: A) BIGINT. B) BIT. C) MULTISET. D) XML.

BIT

A join in which the joining condition is based on equality between values in the common columns is called a(n): A) equi-join. B) unilateral join. C) natural join. D) both A and C.

both A and C

In order for two queries to be UNION-compatible, they must: A) both have the same number of lines in their SQL statements. B) both output compatible data types for each column and return the same number of rows. C) both return at least one row. D) all of the above.

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

RANK and DENSE-RANK are examples of: A) ceilings. B) door functions. C) window functions. D) moving functions.

window functions

In order to embed SQL inside of another language, the ________ statement must be placed before the SQL in the host language. A) GET SQL B) EXEC SQL C) RUN SQL D) SQL SQL

EXEC SQL

________ differs from array because it can contain duplicates. A) BIGINT B) XML C) MULTISET D) TABLE

MULTISET

A new set of analytical functions added in SQL:2008 is referred to as: A) OLAF functions. B) MOLAP functions. C) average functions. D) OLAP functions.

OLAP functions

A procedure is: A) stored within the database. B) given a unique name. C) called by name. D) all of the above.

all of the above

SQL-invoked routines can be: A) procedures. B) functions. C) all of the above. D) none of the above.

all of the above

The MERGE command: A) allows one to combine the INSERT and UPDATE operations. B) allows one to combine the INSERT and DELETE operations. C) joins 2 tables together. D) none of the above.

allows one to combine the INSERT and UPDATE operations


Related study sets

C5 Test -Group Life, Qualified Plans, Business Uses and Taxation

View Set

International management module 8

View Set

Chapter 15 - Operational and Enterprise risk Management

View Set

Compensation Test 2- Quiz Questions

View Set

International Business Final Exam Review

View Set

6.11 Unit Test: Entering a New Century - Part 1

View Set

Ch4 - The meaning of interest rates

View Set