Databases Flashcards

1
Q

HAVING

A

Can be used on a select statement to specify a certain property you’re expecting in your result set.

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

count(*)

A

A function that counts number of records. May be used as an aggregate function.

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

What is the difference between implicit and explicit join.

A

The explicit joins utilizes the ON statement instead of the WHERE clause.

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

What is the difference between normalized and denormalized databases.

A

Normalized databases are designed to minimize redundancy. Denormalized databases are designed to optimize read time.

i.e. a normalized database table will contain a foreign key, but looking up foreign data will require an expensive join.

In a denormalized database, data may exist redundantly across multiple tables.

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

Aggregate function MAX()

A

Returns the maximum value from an aggregate.

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

Aggregate function MIN()

A

Returns the minimum value from an aggregate.

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

Aggregate function AVG()

A

Returns the average of the argument.

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

COUNT()

A

Returns count of rows returned.

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

COUNT(DISTINCT)

A

Returns count of a number of different values.

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

SUM()

A

Returns sum of the arguments.

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