Deck 5: Multiple-Table Queries
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/75
العب
ملء الشاشة (f)
Deck 5: Multiple-Table Queries
1
In a full outer join, all rows from both tables will be included regardless of whether they match rows from the other table.
True
2
There are three types of inner joins.
False
3
In small databases, there is a significant time difference between different query approaches.
False
4
You must use a comma or a period to separate a table name from its alias.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
5
You can perform special operations within SQL.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
6
It is permissible to qualify all column names in a query.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
7
You can join three tables together but not four tables.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
8
The product operation is commonly used.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
9
MySQL supports the INTERSECT operator.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
10
One reason for using an alias is simplicity.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
11
To ensure that query results are listed in a desired order, use the ORDER BY clause.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
12
When joining tables, it is always necessary to qualify a column name.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
13
There is only one approach to joining tables.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
14
You can use the ALL and ANY operators with subqueries to produce a single column of numbers.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
15
Occasionally, a self-join might involve the primary key of a table.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
16
It is easy to create a product inadvertently by omitting the WHERE clause when you are attempting to join tables.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
17
When using a DBMS without an optimizer, the formulation of a query can make a difference in the speed with which the query is executed..
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
18
MySQL does not support the MINUS operator.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
19
You can join tables by using a condition in the WHERE clause.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
20
For two tables to be union compatible, the columns of the two tables must be identical.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
21
The ____ of two tables is the set of all rows that are in the first table but that are not in the second table.
A)union
B)intersect
C)intersection
D)difference
A)union
B)intersect
C)intersection
D)difference
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
22
You can join tables by using a condition in the ____ clause.
A)FROM
B)WHERE
C)SELECT
D)JOIN
A)FROM
B)WHERE
C)SELECT
D)JOIN
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
23
You must join tables on matching columns.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
24
You can precede a subquery with the ____ operator to create a condition that is true if one or more rows are obtained when the subquery is executed.
A)IS NULL
B)IS TRUE
C)IS EXIST
D)EXISTS
A)IS NULL
B)IS TRUE
C)IS EXIST
D)EXISTS
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
25
When a subquery involves a table listed in the outer query, the subquery is called a(n)____ subquery.
A)inner outer
B)correlated
C)reverse
D)parameter
A)inner outer
B)correlated
C)reverse
D)parameter
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
26
One reason for using an alias is when you are joining a table to itself.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
27
The ____ of two tables is a table containing all rows that are in both tables.
A)intersect
B)union
C)difference
D)minus
A)intersect
B)union
C)difference
D)minus
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
28
A(n)____ clause can include statistics calculated for only the groups or columns whose values are identical for each row in a group.
A)SELECT
B)WHERE
C)FROM
D)EXISTS
A)SELECT
B)WHERE
C)FROM
D)EXISTS
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
29
To produce the same results as the INTERSECT operator, use the BETWEEN operator and a subquery.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
30
To qualify a column name, precede the name of the column with the name of the table, followed by a(n)____.
A),
B).
C)%
D)*
A),
B).
C)%
D)*
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
31
To retrieve data from multiple tables in a query you can use the ____ operator with a subquery.
A)AND
B)IN
C)OR
D)NOT
A)AND
B)IN
C)OR
D)NOT
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
32
You can use MySQL to create a nested subquery.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
33
You can use the EXISTS operator to retrieve data from more than one table.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
34
You create an alias by typing the name of the table, pressing the ____, and then typing the name of the alias.
A)Tab
B)Backspace
C)Enter
D)Spacebar
A)Tab
B)Backspace
C)Enter
D)Spacebar
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
35
To produce the same results as the MINUS operator, use NOT, the IN operator and a subquery.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
36
To relate two tables, in the FROM clause list all columns involved in the query.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
37
In a nested query, the outer query is evaluated first.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
38
The ____ of two tables is a table containing every row that is in either the first table, the second table, or both tables.
A)intersection
B)union
C)minus
D)difference
A)intersection
B)union
C)minus
D)difference
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
39
Table A has 10 rows and table B has 10 rows. The product of Table A and Table B would have 100 rows.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
40
When the innermost subquery is evaluated, a permanent table is produced.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
41
When tables are listed in the FROM clause, you can give each table a(n)____________________, or an alternate name.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
42
In a ____, all rows from the table on the left (the table listed first in the query)will be included regardless of whether they match rows from the table on the right (the table listed second in the query).
A)left inner join
B)left outer join
C)right inner join
D)right outer join
A)left inner join
B)left outer join
C)right inner join
D)right outer join
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
43
You join tables in SQL by including a condition in the ____________________ clause to ensure that matching columns contain equal values.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
44
In a ____, all rows from the table on the right will be included regardless of whether they match rows from the table on the left.
A)left inner join
B)left outer join
C)right outer join
D)right inner join
A)left inner join
B)left outer join
C)right outer join
D)right inner join
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
45
Which of the following joins compares the tables in the FROM clause and lists only those rows that satisfy the condition in the WHERE clause?
A)inner
B)outer
C)nested
D)product
A)inner
B)outer
C)nested
D)product
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
46
The product of two tables is formally called the ____ Product.
A)Oracle
B)Outer
C)SQL
D)Cartesian
A)Oracle
B)Outer
C)SQL
D)Cartesian
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
47
When there is potential ambiguity in listing column names, you must ____________________ the columns involved in the query.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
48
A subquery within a subquery is called a(n)____________________ subquery.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
49
If you precede the subquery by the ____ operator, the condition is true only if it satisfies all values produced by the subquery.
A)TRUE
B)ALL
C)IS ALL
D)ALWAYS
A)TRUE
B)ALL
C)IS ALL
D)ALWAYS
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
50
In a(n)____ join, all rows from both tables are included regardless of whether they match rows from the other table..
A)normal
B)inner
C)full outer
D)combined
A)normal
B)inner
C)full outer
D)combined
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
51
If you precede the subquery by the ____ operator, the condition is true only if it satisfies any value (one or more)produced by the subquery.
A)IS SOME
B)IS ANY
C)SOME
D)ANY
A)IS SOME
B)IS ANY
C)SOME
D)ANY
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
52
Two tables are ____ compatible if they have the same number of columns and if their corresponding columns have identical data types and lengths.
A)union
B)minus
C)difference
D)intersect
A)union
B)minus
C)difference
D)intersect
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
53
The subquery that involves a table listed in the outer query is called a(n)____________________ subquery.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
54
If you had two separate tables for customers and the query requested customers in the first table having the same city as customers in the second table, you could use a normal ____________________ operation to find the answer.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
55
Joining a table to itself, is called a(n)____________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
56
In a multiple-table query, you list all the desired columns in the ____________________ clause and qualify any columns that appear in more than one table.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
57
MySQL performs many built-in ____________________ that analyze queries to determine the best way to satisfy them.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
58
Which of the following set operators are not supported by MySQL?
A)UNION and MINUS
B)MINUS and INTERSECT
C)UNION and INTERSECT
D)UNION and ALL
A)UNION and MINUS
B)MINUS and INTERSECT
C)UNION and INTERSECT
D)UNION and ALL
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
59
For an SQL implementation to truly support the union operation, it must remove____ rows automatically..
A)dependent
B)no
C)independent
D)duplicate
A)dependent
B)no
C)independent
D)duplicate
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
60
To retrieve data from more than one table, you must ____________________ the tables together by finding rows in the two tables that have identical values in matching columns.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
61
The ____________________ of two tables is the set of all rows that are in the first table but that are not in the second table.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
62
Why do you use the ANY and ALL operators? What is the difference between the two operators?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
63
A join that compares the tables in the FROM clause and lists only those rows that satisfy the condition in the WHERE clause is called a(n)____________________ join.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
64
Two tables are ____________________ compatible if they have the same number of columns and if their corresponding columns have identical data types and lengths.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
65
The ____________________ of two tables is a table containing all rows that are in both tables.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
66
Sometimes you need to list all the rows from one of the tables in a join, regardless of whether they match any rows in the other table. This type of join is called a(n)____________________ join.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
67
The ____________________ of two tables is the combination of all rows in the first table and all rows in the second table.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
68
What steps should you take to join (relate)tables?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
69
If you precede a subquery by the ____________________ operator, the condition is true only if it satisfies one or more values produced by the subquery.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
70
What steps should you do to construct a detailed query in a step-by-step fashion?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
71
Describe the types of outer joins.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
72
If the SQL implementation truly supports the union operation, it will remove any duplicate ____________________ automatically.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
73
The ____________________ of two tables is a table containing every row that is in either the first table, the second table, or both tables.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
74
There are three set operations: union, intersection, difference. Define each of these operations. Which one(s)does MySQL support?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck
75
If you precede a subquery by the ____________________ operator, the condition is true only if it satisfies all values produced by the subquery.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 75 في هذه المجموعة.
فتح الحزمة
k this deck