Deck 7: Advanced SQL

ملء الشاشة (f)
exit full mode
سؤال
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
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
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 decreased due to query optimization.
D) all triggers delete rows.
سؤال
The following code would include: SELECT Customer_T.CustomerID, Order_T.CustomerID,
CustomerName, OrderID
FROM Customer_T, Order_T
WHERE Customer_T.CustomerID = Order_T. CustomerID;

A) all rows of the Order_T Table regardless of matches with the Customer_T Table.
B) all rows of the Customer_T Table regardless of matches with the Order_T Table.
C) only rows that match both Customer_T and Order_T Tables.
D) only rows that don't match both Customer_T and Order_T Tables.
سؤال
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.
سؤال
The following code would include: SELECT Customer_T.CustomerID,CustomerName, OrderID
FROM Customer_T LEFT OUTER JOIN Order_T ON
Customer_T.CustomerID = Order_T.CustomerID;

A) all rows of the Order_T Table regardless of matches with the Customer_T Table.
B) all rows of the Customer_T Table regardless of matches with the Order_T Table.
C) only rows that match both Customer_T and Order_T Tables.
D) only rows that don't match both Customer_T and Order_T Tables.
سؤال
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.
سؤال
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.
سؤال
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.
سؤال
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) both return exactly one row.
سؤال
The following code is an example of a(n): SELECT Customer_T.CustomerID, Order_T.CustomerID,
CustomerName, OrderID
FROM Customer_T, Order_T
WHERE Customer_T.CustomerID = Order_T. CustomerID;

A) equi-join.
B) subquery.
C) Full Outer JOIN.
D) Right Outer JOIN.
سؤال
The most commonly used form of join operation is the:

A) outer join.
B) union join.
C) equi-join.
D) natural join.
سؤال
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.
سؤال
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 only the data that you need.
سؤال
A ________ is a temporary table used in the FROM clause of an SQL query.

A) correlated subquery
B) derived table
C) view table
D) trigger
سؤال
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) DDL statements are prohibited.
سؤال
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) find all rows that are in one table, but not the other.
سؤال
The ________ operator is used to combine the output from multiple queries into a single result table.

A) INTERSECT
B) DIVIDE
C) COLLATE
D) UNION
سؤال
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.
سؤال
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.
سؤال
The following code would include: SELECT Customer_T.CustomerID,CustomerName, OrderID
FROM Customer_T RIGHT OUTER JOIN Order_T ON
Customer_T.CustomerID = Order_T.CustomerID;

A) all rows of the Order_T Table regardless of matches with the Customer_T Table.
B) all rows of the Customer_T Table regardless of matches with the Order_T Table.
C) only rows that match both Customer_T and Order_T Tables.
D) only rows that don't match both Customer_T and Order_T Tables.
سؤال
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.
سؤال
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
سؤال
The outer join syntax does not apply easily to a join condition of more than ________ tables.

A) two
B) three
C) four
D) five
سؤال
What results would the following SQL statement produce? select owner, table_name
From dba_tables
Where table_name = 'CUSTOMER';

A) A listing of all customers in the customer table
B) A listing of the owner of the customer table
C) A listing of the owner of the customer table as well as customers
D) An error message
سؤال
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.
سؤال
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 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).
D) There is never a situation that requires only an outer join.
سؤال
If the DBA wishes to describe all tables in the database, which data dictionary view should be accessed in Oracle?

A) DBA_TAB_PRIVS
B) DBA_TAB_COMMENTS
C) DBA_TABLE_LABEL
D) DBA_TABLES
سؤال
SQL-invoked routines can be:

A) part of a DDL statement.
B) functions or procedures.
C) part of a DCL statement.
D) contained within a CREATE statement.
سؤال
The ________ DBA view shows information about all users of the database in Oracle.

A) DBA_USERS
B) USERS
C) DBA_VIEWS
D) DBA_INDEXES
سؤال
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
سؤال
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.
سؤال
All of the following are part of the coding structure for triggers EXCEPT:

A) event.
B) condition.
C) selection.
D) action.
سؤال
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) information's data type changes.
سؤال
________ 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
سؤال
While triggers run automatically, ________ do not and have to be called.

A) trapdoors
B) routines
C) selects
D) updates
سؤال
The following code is an example of a: SELECT CustomerName, CustomerAddress, CustomerCity, CustomerState,
CustomerPostalCode
FROM Customer_T
WHERE Customer_T.CustomerID =
(SELECT Order_T.CustomerID
FROM Order_T
WHERE OrderID = 1008);

A) Correlated subquery.
B) Subquery.
C) JOIN.
D) FULL OUTER JOIN.
سؤال
________ 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
سؤال
An operation to join a table to itself is called a(n):

A) sufficient-join.
B) inner join.
C) outer join.
D) self-join.
سؤال
A type of join where a table is joined to itself is called a(n):

A) ternary join.
B) self-join.
C) unnatural join.
D) pinned join.
سؤال
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
سؤال
User-defined data types:

A) are not allowed in any DBMS.
B) are only allowed in Oracle.
C) can have defined functions and methods.
D) can be used once in a system.
سؤال
An equi-join is a join in which one of the duplicate columns is eliminated in the result table.
سؤال
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) global triggers.
سؤال
A join in which the joining condition is based on equality between values in the common column is called an equi-join.
سؤال
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.
سؤال
RANK and DENSE-RANK are examples of:

A) ceilings.
B) door functions.
C) window functions.
D) moving functions.
سؤال
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.
سؤال
It is better not to have a result set identified before writing GROUP BY and HAVING clauses for a query.
سؤال
Figuring out what attributes you want in your query before you write the query will help with query writing.
سؤال
The joining condition of an equi-join is based upon an equality.
سؤال
All of the following are new data types added in SQL:2008 EXCEPT:

A) BIGINT.
B) BIT.
C) MULTISET.
D) XML.
سؤال
Combining a table with itself results in a faster query.
سؤال
IF-THEN-ELSE logical processing cannot be accomplished within an SQL statement.
سؤال
________ differs from array because it can contain duplicates.

A) BIGINT
B) XML
C) MULTISET
D) TABLE
سؤال
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.
سؤال
All of the following are advantages of SQL-invoked routines EXCEPT:

A) flexibility.
B) efficiency.
C) sharability.
D) security.
سؤال
Transaction integrity commands are not used to identify whole units of database changes that must be completed in full for the database to retain integrity.
سؤال
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) is always a single table operation.
سؤال
A procedure is:

A) stored outside the database.
B) given a reserved SQL name.
C) called by name.
D) unable to be modified.
سؤال
The UNION clause is used to combine the output from multiple queries into a single result table.
سؤال
There is a special operation in SQL to join a table to itself.
سؤال
The following queries produce the same results.
Select DISTINCT customer_name, customer_city
from customer, salesman
where customer.salesman_id = salesman.salesman_id
and salesman.lname = 'SMITH';
select customer_name, customer_city
from customer
where customer.salesman_id =
(select salesman_id
from salesman
where lname = 'SMITH');
سؤال
EXISTS takes a value of false if the subquery returns an intermediate result set.
سؤال
The following code is an example of a Subquery.
SELECT Customer_T.CustomerID, Order_T.CustomerID,
CustomerName, OrderID
FROM Customer_T, Order_T
WHERE Customer_T.CustomerID = Order_T. CustomerID;
سؤال
When EXISTS or NOT EXISTS is used in a subquery, the select list of the subquery will usually just select all columns as a placeholder because it doesn't matter which columns are returned.
سؤال
The following code is an example of a correlated subquery.
SELECT CustomerName, CustomerAddress, CustomerCity, CustomerState,
CustomerPostalCode
FROM Customer_T
WHERE Customer_T.CustomerID =
(SELECT Order_T.CustomerID
FROM Order_T
WHERE OrderID = 1008);
سؤال
In order to find out what customers have not placed an order for a particular item, one might use the NOT qualifier along with the IN qualifier.
سؤال
When a subquery is used in the FROM clause, it is called a denied table.
سؤال
Joining tables or using a subquery may produce the same result.
سؤال
A natural join is the same as an equi-join, except that it is performed over matching columns that have been defined with the same name, and one of the duplicate columns is eliminated.
سؤال
An SQL query that implements an outer join will return rows that do not have matching values in common columns.
سؤال
Subqueries can only be used in the WHERE clause.
سؤال
A correlated subquery is executed once for each iteration through the outer loop.
سؤال
The natural join is very rarely used.
سؤال
Using an outer join produces this information: rows that do not have matching values in common columns are not included in the result table.
سؤال
Correlated subqueries are less efficient than queries that do not use nesting.
سؤال
A subquery in which processing the inner query depends on data from the outer query is called a codependent query.
سؤال
One major disadvantage of the outer join is that information is easily lost.
سؤال
The following query will execute without errors.
select customer.customer_name, salesman.sales_quota
from customer
where customer.salesman_id =
(select salesman_id
where lname = 'SMITH');
سؤال
The following SQL statement is an example of a correlated subquery.
select first_name, last_name, total_sales
from salesman s1
where total_sales > all
(select total_sales from salesman s2
where s1.salesman_id != s2.salesman_id);
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/107
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 7: Advanced SQL
1
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
B
2
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 decreased due to query optimization.
D) all triggers delete rows.
A
3
The following code would include: SELECT Customer_T.CustomerID, Order_T.CustomerID,
CustomerName, OrderID
FROM Customer_T, Order_T
WHERE Customer_T.CustomerID = Order_T. CustomerID;

A) all rows of the Order_T Table regardless of matches with the Customer_T Table.
B) all rows of the Customer_T Table regardless of matches with the Order_T Table.
C) only rows that match both Customer_T and Order_T Tables.
D) only rows that don't match both Customer_T and Order_T Tables.
C
4
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
5
The following code would include: SELECT Customer_T.CustomerID,CustomerName, OrderID
FROM Customer_T LEFT OUTER JOIN Order_T ON
Customer_T.CustomerID = Order_T.CustomerID;

A) all rows of the Order_T Table regardless of matches with the Customer_T Table.
B) all rows of the Customer_T Table regardless of matches with the Order_T Table.
C) only rows that match both Customer_T and Order_T Tables.
D) only rows that don't match both Customer_T and Order_T Tables.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
6
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
7
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
8
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
9
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) both return exactly one row.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
10
The following code is an example of a(n): SELECT Customer_T.CustomerID, Order_T.CustomerID,
CustomerName, OrderID
FROM Customer_T, Order_T
WHERE Customer_T.CustomerID = Order_T. CustomerID;

A) equi-join.
B) subquery.
C) Full Outer JOIN.
D) Right Outer JOIN.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
11
The most commonly used form of join operation is the:

A) outer join.
B) union join.
C) equi-join.
D) natural join.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
12
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
13
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 only the data that you need.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
14
A ________ is a temporary table used in the FROM clause of an SQL query.

A) correlated subquery
B) derived table
C) view table
D) trigger
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
15
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) DDL statements are prohibited.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
16
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) find all rows that are in one table, but not the other.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
17
The ________ operator is used to combine the output from multiple queries into a single result table.

A) INTERSECT
B) DIVIDE
C) COLLATE
D) UNION
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
18
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
19
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
20
The following code would include: SELECT Customer_T.CustomerID,CustomerName, OrderID
FROM Customer_T RIGHT OUTER JOIN Order_T ON
Customer_T.CustomerID = Order_T.CustomerID;

A) all rows of the Order_T Table regardless of matches with the Customer_T Table.
B) all rows of the Customer_T Table regardless of matches with the Order_T Table.
C) only rows that match both Customer_T and Order_T Tables.
D) only rows that don't match both Customer_T and Order_T Tables.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
21
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
22
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
23
The outer join syntax does not apply easily to a join condition of more than ________ tables.

A) two
B) three
C) four
D) five
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
24
What results would the following SQL statement produce? select owner, table_name
From dba_tables
Where table_name = 'CUSTOMER';

A) A listing of all customers in the customer table
B) A listing of the owner of the customer table
C) A listing of the owner of the customer table as well as customers
D) An error message
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
25
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
26
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 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).
D) There is never a situation that requires only an outer join.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
27
If the DBA wishes to describe all tables in the database, which data dictionary view should be accessed in Oracle?

A) DBA_TAB_PRIVS
B) DBA_TAB_COMMENTS
C) DBA_TABLE_LABEL
D) DBA_TABLES
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
28
SQL-invoked routines can be:

A) part of a DDL statement.
B) functions or procedures.
C) part of a DCL statement.
D) contained within a CREATE statement.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
29
The ________ DBA view shows information about all users of the database in Oracle.

A) DBA_USERS
B) USERS
C) DBA_VIEWS
D) DBA_INDEXES
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
30
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
31
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
32
All of the following are part of the coding structure for triggers EXCEPT:

A) event.
B) condition.
C) selection.
D) action.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
33
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) information's data type changes.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
34
________ 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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
35
While triggers run automatically, ________ do not and have to be called.

A) trapdoors
B) routines
C) selects
D) updates
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
36
The following code is an example of a: SELECT CustomerName, CustomerAddress, CustomerCity, CustomerState,
CustomerPostalCode
FROM Customer_T
WHERE Customer_T.CustomerID =
(SELECT Order_T.CustomerID
FROM Order_T
WHERE OrderID = 1008);

A) Correlated subquery.
B) Subquery.
C) JOIN.
D) FULL OUTER JOIN.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
37
________ 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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
38
An operation to join a table to itself is called a(n):

A) sufficient-join.
B) inner join.
C) outer join.
D) self-join.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
39
A type of join where a table is joined to itself is called a(n):

A) ternary join.
B) self-join.
C) unnatural join.
D) pinned join.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
40
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
41
User-defined data types:

A) are not allowed in any DBMS.
B) are only allowed in Oracle.
C) can have defined functions and methods.
D) can be used once in a system.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
42
An equi-join is a join in which one of the duplicate columns is eliminated in the result table.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
43
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) global triggers.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
44
A join in which the joining condition is based on equality between values in the common column is called an equi-join.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
45
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
46
RANK and DENSE-RANK are examples of:

A) ceilings.
B) door functions.
C) window functions.
D) moving functions.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
47
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
48
It is better not to have a result set identified before writing GROUP BY and HAVING clauses for a query.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
49
Figuring out what attributes you want in your query before you write the query will help with query writing.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
50
The joining condition of an equi-join is based upon an equality.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
51
All of the following are new data types added in SQL:2008 EXCEPT:

A) BIGINT.
B) BIT.
C) MULTISET.
D) XML.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
52
Combining a table with itself results in a faster query.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
53
IF-THEN-ELSE logical processing cannot be accomplished within an SQL statement.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
54
________ differs from array because it can contain duplicates.

A) BIGINT
B) XML
C) MULTISET
D) TABLE
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
55
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
56
All of the following are advantages of SQL-invoked routines EXCEPT:

A) flexibility.
B) efficiency.
C) sharability.
D) security.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
57
Transaction integrity commands are not used to identify whole units of database changes that must be completed in full for the database to retain integrity.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
58
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) is always a single table operation.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
59
A procedure is:

A) stored outside the database.
B) given a reserved SQL name.
C) called by name.
D) unable to be modified.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
60
The UNION clause is used to combine the output from multiple queries into a single result table.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
61
There is a special operation in SQL to join a table to itself.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
62
The following queries produce the same results.
Select DISTINCT customer_name, customer_city
from customer, salesman
where customer.salesman_id = salesman.salesman_id
and salesman.lname = 'SMITH';
select customer_name, customer_city
from customer
where customer.salesman_id =
(select salesman_id
from salesman
where lname = 'SMITH');
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
63
EXISTS takes a value of false if the subquery returns an intermediate result set.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
64
The following code is an example of a Subquery.
SELECT Customer_T.CustomerID, Order_T.CustomerID,
CustomerName, OrderID
FROM Customer_T, Order_T
WHERE Customer_T.CustomerID = Order_T. CustomerID;
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
65
When EXISTS or NOT EXISTS is used in a subquery, the select list of the subquery will usually just select all columns as a placeholder because it doesn't matter which columns are returned.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
66
The following code is an example of a correlated subquery.
SELECT CustomerName, CustomerAddress, CustomerCity, CustomerState,
CustomerPostalCode
FROM Customer_T
WHERE Customer_T.CustomerID =
(SELECT Order_T.CustomerID
FROM Order_T
WHERE OrderID = 1008);
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
67
In order to find out what customers have not placed an order for a particular item, one might use the NOT qualifier along with the IN qualifier.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
68
When a subquery is used in the FROM clause, it is called a denied table.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
69
Joining tables or using a subquery may produce the same result.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
70
A natural join is the same as an equi-join, except that it is performed over matching columns that have been defined with the same name, and one of the duplicate columns is eliminated.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
71
An SQL query that implements an outer join will return rows that do not have matching values in common columns.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
72
Subqueries can only be used in the WHERE clause.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
73
A correlated subquery is executed once for each iteration through the outer loop.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
74
The natural join is very rarely used.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
75
Using an outer join produces this information: rows that do not have matching values in common columns are not included in the result table.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
76
Correlated subqueries are less efficient than queries that do not use nesting.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
77
A subquery in which processing the inner query depends on data from the outer query is called a codependent query.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
78
One major disadvantage of the outer join is that information is easily lost.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
79
The following query will execute without errors.
select customer.customer_name, salesman.sales_quota
from customer
where customer.salesman_id =
(select salesman_id
where lname = 'SMITH');
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
80
The following SQL statement is an example of a correlated subquery.
select first_name, last_name, total_sales
from salesman s1
where total_sales > all
(select total_sales from salesman s2
where s1.salesman_id != s2.salesman_id);
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 107 في هذه المجموعة.