Databases Flashcards
HAVING
Can be used on a select statement to specify a certain property you’re expecting in your result set.
count(*)
A function that counts number of records. May be used as an aggregate function.
What is the difference between implicit and explicit join.
The explicit joins utilizes the ON statement instead of the WHERE clause.
What is the difference between normalized and denormalized databases.
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.
Aggregate function MAX()
Returns the maximum value from an aggregate.
Aggregate function MIN()
Returns the minimum value from an aggregate.
Aggregate function AVG()
Returns the average of the argument.
COUNT()
Returns count of rows returned.
COUNT(DISTINCT)
Returns count of a number of different values.
SUM()
Returns sum of the arguments.