SELECT DECK 1 Flashcards

1
Q

What is the shorthand form of the DESCRIBE command?

A

DESC

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the name of the generic all-purpose table belonging to the SYS schema?

A

DUAL

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Do blank spaces count as NULL?

A

No. NULL is only an absence of data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What three relational concepts are present in the SELECT statement?

A

PROJECT, SELECTION, and JOINING.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

PROJECTION refers to what?

A

PROJECTION refers to the restriction of columns selected from a table.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

SELECTION refers to what?

A

SELECTION refers to the restriction of rows selected from a table.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

The relational concept JOIN refers to what?

A

JOIN refers to the interaction of tables with each other in a query.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the two mandatory clauses in an SQL query?

A

The SELECT clause and the FROM clause.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is an ALIAS?

A

An alternate name for referencing a column or expression.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How do you eliminate duplicate results from a query?

A

Include the DISTINCT keyword.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

In what clause is the DISTINCT keyword used?

A

In the SELECT clause.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

In Oracle, how do you specify which terms are affected by DISTINCT?

A

DISTINCT refers to the values listed after it and before the FROM clause.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What operations may be used on DATE or TIMESTAMP values?

A

Addition and subtraction only.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

The process of modeling data into relational tables is known as…?

A

Normalization.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

In Normalization, what is the First Normal Form?

A

Removal of repeating groups

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

In Normalization, what is the Second Normal Form?

A

Removal of columns that are not dependent on the primary key.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

In Normalization, what is the Third Normal Form?

A

Removal of all columns that are interdependent.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

In standard notation for text description of a table, what symbol is used for primary key columns?

A

A hash symbol (#)

19
Q

In standard notation for text description of a table, what symbol is used for foreign key columns?

A

A backslash ()

20
Q

In standard notation for text description of a table, what symbol is used for mandatory (NOT NULL) columns?

A

An asterisk (*)

21
Q

In standard notation for text description of a table, what symbol is used for optional columns?

A

A lower-case letter “O” (o)

22
Q

How many Normal Forms exist for Normalization?

A

At least five, but only the first three are normally used.

23
Q

What is an Entity-Relationship diagram?

A

A graphical representation of the connections between tables.

24
Q

Are SQL commands case-sensitive?

25
Is a statement terminator required?
Not always, but it's a good idea to include one anyway.
26
What is the definition of a primary key?
It's an attribute (or attributes) that uniquely identify a record.
27
What is the definition of a foreign key?
It's a column (or concat of several columns) that uniquely identify a related row in another rtable.
28
A foreign key in one table will match . . . in another table.
a primary key
29
The basis of the many-to-one relationship is . . .
the foreign key.
30
How is an ALIAS created?
Either list it immediately after the referenced column, or use the AS keyword.
31
What format is returned for an unquoted alias?
Unquoted aliases are upper case.
32
To specify case or use spaces in an ALIAS, you must . . .
surround the alias with double quotes.
33
What is the concat operator?
The double-pipe ( || ).
34
How do you specify a char literal?
With single quote marks.
35
When are single quote marks used?
To specify a char literal.
36
How do you specify a single quote in a literal string?
Use a double quote, as in 'That is Dippy''s calculator'
37
What is a literal quote?
a lower-case q, followed by a single quote, followed by the char you want to use to indicate a quote mark, as in SELECT q'X
38
Do any rational people use literal quotes?
Of course not. But you might run into them sometime, so you should know what they are.
39
NULL refers to . . .
an absence of data.
40
Any arithmetic calculation with a NULL value returns . . .
NULL.
41
Division by zero results in an error. Division by NULL results in
NULL.
42
When a NULL value is encountered by the concat operator . . .
it is ignored.
43
The WHERE clause in a SELECT statement is sometimes referred to as . . .
the predicate.