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?

A

No.

25
Q

Is a statement terminator required?

A

Not always, but it’s a good idea to include one anyway.

26
Q

What is the definition of a primary key?

A

It’s an attribute (or attributes) that uniquely identify a record.

27
Q

What is the definition of a foreign key?

A

It’s a column (or concat of several columns) that uniquely identify a related row in another rtable.

28
Q

A foreign key in one table will match . . . in another table.

A

a primary key

29
Q

The basis of the many-to-one relationship is . . .

A

the foreign key.

30
Q

How is an ALIAS created?

A

Either list it immediately after the referenced column, or use the AS keyword.

31
Q

What format is returned for an unquoted alias?

A

Unquoted aliases are upper case.

32
Q

To specify case or use spaces in an ALIAS, you must . . .

A

surround the alias with double quotes.

33
Q

What is the concat operator?

A

The double-pipe ( || ).

34
Q

How do you specify a char literal?

A

With single quote marks.

35
Q

When are single quote marks used?

A

To specify a char literal.

36
Q

How do you specify a single quote in a literal string?

A

Use a double quote, as in ‘That is Dippy’’s calculator’

37
Q

What is a literal quote?

A

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
Q

Do any rational people use literal quotes?

A

Of course not. But you might run into them sometime, so you should know what they are.

39
Q

NULL refers to . . .

A

an absence of data.

40
Q

Any arithmetic calculation with a NULL value returns . . .

A

NULL.

41
Q

Division by zero results in an error. Division by NULL results in

A

NULL.

42
Q

When a NULL value is encountered by the concat operator . . .

A

it is ignored.

43
Q

The WHERE clause in a SELECT statement is sometimes referred to as . . .

A

the predicate.