SQL Fundamentals
- 119Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
119 questions
- 1SQL stands for_____.
Hint
Think of the full name of the language used to communicate with databases.
Answer
structured query language
- 2SQL is primarily used to communicate with_____.
Hint
It is the query language used to get data in and out of database servers.
Answer
databases
- 3A database is software that makes it easier to store large amounts of data in a computer's_____.
Hint
Think about where files are stored on a computer.
Answer
file system
- 4A database can be compared conceptually to an advanced version of Microsoft Excel or_____.
Hint
It is another spreadsheet application mentioned in the lesson.
Answer
Google Sheets
- 5SQL automates database creates, reads, updates, and deletes, commonly abbreviated as_____.
Hint
The abbreviation consists of the first letters of the four operations.
Answer
CRUD
- 6A SQL read operation is generally performed with a_____statement.
Hint
This statement retrieves data from a table.
Answer
SELECT
- 7The result of a SQL SELECT statement is typically a result set organized as rows and_____.
Hint
Think of the structure of a table.
Answer
columns
- 8SQL statements conventionally end with a_____.
Hint
It is the punctuation mark used to terminate SQL statements.
Answer
semicolon
- 9SQL keywords are generally_____insensitive.
Hint
SELECT and select are treated equivalently.
Answer
case
- 10PostgreSQL, MySQL, SQLite, SQL Server, Oracle, and CockroachDB are examples of_____databases.
Hint
They all support structured query language.
Answer
SQL
- 11In a SELECT statement, the_____operator retrieves every column from a table.
Hint
It is also called the wildcard operator.
Answer
star
- 12To select multiple columns in SQL, separate their names with a_____.
Hint
The same punctuation separates items in many lists.
Answer
comma
- 13The clause that identifies the table from which SELECT retrieves data is_____.
Hint
It appears after the selected columns.
Answer
FROM
- 14The clause used to filter rows before returning them is_____.
Hint
It introduces a condition that rows must satisfy.
Answer
WHERE
- 15In SQL, equality is tested with a_____equals sign rather than a double equals sign.
Hint
SQL uses a simpler equality operator than many programming languages.
Answer
single
- 16The SQL condition used to test whether a value falls within two inclusive boundaries is_____.
Hint
It is useful for filtering ages or prices within a range.
Answer
BETWEEN
- 17To reverse a BETWEEN condition and select values outside a range, place_____before BETWEEN.
Hint
This keyword negates the condition.
Answer
NOT
- 18The_____keyword returns only unique values from a result set.
Hint
It prevents repeated values from appearing in the output.
Answer
DISTINCT
- 19The_____clause sorts rows by one or more columns.
Hint
It is commonly combined with ascending or descending order.
Answer
ORDER BY
- 20SQL sorts values from smallest to largest by default, which is called_____order.
Hint
The opposite is descending order.
Answer
ascending
- 21The SQL keyword that restricts the maximum number of returned rows is_____.
Hint
It is useful when a table contains millions of records.
Answer
LIMIT
- 22The_____operator performs fuzzy or wildcard matching against text.
Hint
It can find names that start with or contain a particular string.
Answer
LIKE
- 23In a LIKE pattern, the percent sign matches_____or more characters.
Hint
The pattern can match no additional characters or many additional characters.
Answer
zero
- 24In a LIKE pattern, the underscore wildcard matches exactly_____character.
Hint
It differs from the percent wildcard by matching a single position.
Answer
one
- 25To find names beginning with the letters Al, a LIKE pattern should place a percent wildcard_____the text Al.
Hint
The wildcard represents the remaining characters.
Answer
after
- 26The logical operator that requires both conditions to be true is_____.
Hint
It narrows results by requiring multiple conditions simultaneously.
Answer
AND
- 27The logical operator that requires at least one condition to be true is_____.
Hint
It provides an alternative between conditions.
Answer
OR
- 28Parentheses in SQL conditions are used to control the order of_____.
Hint
They determine which logical expression is evaluated first.
Answer
operations
- 29The SQL syntax used to test whether a value is missing is_____.
Hint
It is not written as an equality comparison with NULL.
Answer
IS NULL
- 30The SQL syntax used to exclude rows containing missing values is_____.
Hint
It is the opposite of IS NULL.
Answer
IS NOT NULL
- 31A SQL NULL value indicates the_____of a value.
Hint
It is different from an empty string, zero, or false.
Answer
absence
- 32The SQL statement used to add new rows to a table is_____.
Hint
It is one of the four CRUD operations.
Answer
INSERT
- 33The SQL statement used to modify existing rows is_____.
Hint
It changes values already stored in a table.
Answer
UPDATE
- 34The SQL statement used to remove rows is_____.
Hint
It corresponds to the final operation in CRUD.
Answer
DELETE
- 35An UPDATE statement uses the_____keyword to specify replacement column values.
Hint
It appears between the table name and the new values.
Answer
SET
- 36A DELETE statement without a WHERE clause can remove_____rows in a table.
Hint
The absence of a filter means every record qualifies.
Answer
all
- 37A safe way to verify which records a DELETE will affect is to run the same condition as a_____statement first.
Hint
This lets you inspect the rows before removing them.
Answer
SELECT
- 38When deleting one known record, filtering by its_____is generally safer than filtering by a common name.
Hint
This value uniquely identifies the row.
Answer
primary key
- 39The SQL keyword that automatically generates successive integer identifiers in supported databases is_____.
Hint
It avoids manually selecting the next available ID.
Answer
AUTOINCREMENT
- 40A randomly generated identifier with an extremely low chance of duplication is called a_____.
Hint
It is an alternative to sequential integer IDs.
Answer
UUID
- 41The HTTP method that commonly maps to a CRUD create operation is_____.
Hint
It is commonly used when submitting new data to a server.
Answer
POST
- 42The HTTP method that commonly maps to a CRUD read operation is_____.
Hint
It is conventionally used to retrieve data.
Answer
GET
- 43The HTTP method that commonly maps to a CRUD update operation is_____.
Hint
It is used to replace or update a resource.
Answer
PUT
- 44In a typical web application, the front end communicates with the backend using_____.
Hint
It is the protocol used for web requests and responses.
Answer
HTTP
- 45In a typical web application, the backend communicates with the database using_____.
Hint
This is the database query language discussed throughout the course.
Answer
SQL
- 46A successful database operation commonly results in an HTTP 200_____response.
Hint
This is the standard phrase associated with status code 200.
Answer
OK
- 47An object relational mapping library maps programming-language objects or structs to database_____.
Hint
It connects in-memory data structures to relational database structures.
Answer
tables
- 48An ORM generally trades simplicity for_____.
Hint
Raw SQL provides more direct control over database behavior.
Answer
control
- 49An ORM can make application code less_____by generating common SQL operations.
Hint
It reduces the amount of code developers must write.
Answer
verbose
- 50A database migration is an incremental change made to a database_____.
Hint
It changes tables, columns, or their structure.
Answer
schema
- 51Adding a new table or column is generally a relatively_____migration.
Hint
Existing application code usually does not depend on something that did not exist.
Answer
safe
- 52Removing a table or column is generally a_____migration.
Hint
Existing code may still query the removed resource.
Answer
dangerous
- 53Before deleting a column or table, developers should first update the application_____to stop using it.
Hint
The application must no longer query the resource being removed.
Answer
code
- 54When adding a column or table, developers can generally update the database before updating the application_____.
Hint
The new resource can exist without being used immediately.
Answer
code
- 55A migration that moves the database forward in time is called an_____migration.
Hint
Its counterpart is used to roll changes back.
Answer
up
- 56A migration used to reverse or roll back a change is called a_____migration.
Hint
It is the opposite of an up migration.
Answer
down
- 57The SQL statement used to rename tables or add and remove columns is_____.
Hint
It modifies an existing table definition.
Answer
ALTER TABLE
- 58The SQLite data type used for whole numbers, including negative values, is_____.
Hint
It represents signed whole numbers.
Answer
integer
- 59The SQLite data type used for numbers with fractional parts is_____.
Hint
It corresponds broadly to floating-point values.
Answer
real
- 60The SQLite data type used for character data is_____.
Hint
Email addresses and names are commonly stored using this type.
Answer
text
- 61The SQLite data type used for large binary data is_____.
Hint
The name suggests a large collection of binary data.
Answer
blob
- 62A constraint is a rule that enforces something about a database_____.
Hint
It restricts what values or structures are permitted.
Answer
schema
- 63A primary key must be unique and also implicitly enforces a_____constraint.
Hint
Every primary key must have a value.
Answer
not null
- 64A primary key is normally placed on a table's_____column.
Hint
This column identifies each record.
Answer
ID
- 65A UNIQUE constraint prevents duplicate values but can typically allow_____values.
Hint
This differs from the behavior of a primary key.
Answer
NULL
- 66A foreign key references the primary key of_____table.
Hint
It establishes a relationship between two tables.
Answer
another
- 67A foreign key constraint ensures that the referenced record actually_____in the other table.
Hint
It prevents relationships from pointing to missing records.
Answer
exists
- 68A relational database typically represents data in_____.
Hint
Rows and columns are its basic organizational structures.
Answer
tables
- 69Each row or entry in a relational table is called a_____.
Hint
It represents one stored entity or association.
Answer
record
- 70A relationship in which one entity can be associated with zero or many entities of another type is a_____relationship.
Hint
A user may have many transactions.
Answer
one to many
- 71A relationship in which each entity corresponds to exactly one entity of another type is a_____relationship.
Hint
A student and one GPA can illustrate this structure.
Answer
one to one
- 72A relationship in which multiple records on each side can be associated with one another is a_____relationship.
Hint
Users and groups can both have multiple associations.
Answer
many to many
- 73For a one-to-many relationship, the foreign key is usually stored on the table representing the_____side.
Hint
Tweets store the ID of the user who authored them.
Answer
many
- 74A table used to model a many-to-many relationship is called a_____table.
Hint
It sits between the two related entity tables.
Answer
joining
- 75A joining table normally contains only the identifiers of the related_____.
Hint
It should not usually contain descriptive metadata.
Answer
entities
- 76A database designed to reduce duplicated data and improve data integrity is more highly_____.
Hint
This is the goal of database normalization.
Answer
normalized
- 77First normal form requires every row to have a unique_____.
Hint
This prevents completely duplicate rows.
Answer
primary key
- 78First normal form prohibits_____tables inside cells.
Hint
Each cell should contain an atomic value rather than another table.
Answer
nested
- 79Second normal form requires non-key columns to depend on the_____primary key.
Hint
They must not depend on only part of a composite key.
Answer
entire
- 80Third normal form requires non-key columns to depend only on the_____key.
Hint
A non-key column should not depend on another non-key column.
Answer
primary
- 81Boyce-Codd normal form prevents a primary-key column from depending on a column that is not part of the_____key.
Hint
This addresses a special case involving multiple candidate keys.
Answer
primary
- 82The main practical goals of normalization are reducing data redundancy and improving data_____.
Hint
The second goal concerns keeping data correct and consistent.
Answer
integrity
- 83A user's birthday is generally better to store than their current age because the birthday does not become_____over time.
Hint
Age changes as time passes, but the date of birth does not.
Answer
out of date
- 84A database should generally store data in a_____form rather than only storing precomputed results.
Hint
Aggregations can be calculated later from this form.
Answer
raw
- 85A SQL alias temporarily renames a table or column for the duration of a_____.
Hint
The alias is not permanently saved in the database schema.
Answer
query
- 86The SQL keyword used to create an alias is_____.
Hint
It appears between the original name and its temporary name.
Answer
AS
- 87The SQL function that conditionally returns one of two values is_____.
Hint
It behaves similarly to a ternary expression.
Answer
IIF
- 88The aggregation function that counts rows is_____.
Hint
It can be used with a wildcard to count all records.
Answer
COUNT
- 89The aggregation function that adds numeric values is_____.
Hint
It is useful for calculating a user's total transaction amount.
Answer
SUM
- 90The aggregation function that returns the largest value is_____.
Hint
It finds the greatest amount, price, or other value.
Answer
MAX
- 91The aggregation function that returns the smallest value is_____.
Hint
It finds the lowest value in a set.
Answer
MIN
- 92The aggregation function that calculates the mean is_____.
Hint
It returns the average of the selected values.
Answer
AVG
- 93The clause that groups rows so aggregate functions can produce one result per group is_____.
Hint
It can calculate the number of songs per album or balance per user.
Answer
GROUP BY
- 94The clause that filters grouped results after aggregation is_____.
Hint
It is similar to WHERE but operates after GROUP BY.
Answer
HAVING
- 95A subquery allows a query to use the result set of a_____query.
Hint
The inner query appears inside parentheses within another query.
Answer
nested
- 96The SQL clause that checks whether a value matches any item in a list or subquery result is_____.
Hint
It can replace multiple OR conditions.
Answer
IN
- 97An inner join returns rows that have matching records in_____tables.
Hint
It returns only the intersection of the two related sets.
Answer
both
- 98The keyword used to specify the matching relationship in a JOIN is_____.
Hint
It introduces conditions such as matching IDs.
Answer
ON
- 99A left join returns every row from the_____table, even without a match in the other table.
Hint
The table written first in the join is on this side.
Answer
left
- 100A right join can be replaced by reversing the order of the tables and using a_____join.
Hint
The two approaches preserve the same matching logic.
Answer
left
- 101A full join returns every row from_____tables, whether or not the rows match.
Hint
It combines unmatched rows from each side as well as matching rows.
Answer
both
- 102When two joined tables contain columns with the same name, table and column names can be separated with a_____.
Hint
The qualified form looks like table name followed by punctuation and column name.
Answer
dot
- 103Multiple tables can be combined in one query by chaining multiple_____statements.
Hint
Each additional table can be connected with another instance of this operation.
Answer
JOIN
- 104In a financial application, money is often stored as an integer number of the smallest currency_____.
Hint
For dollars, the example uses pennies rather than fractional dollars.
Answer
units
- 105A database index is an in-memory structure that makes queries run more_____.
Hint
Indexes improve lookup performance.
Answer
quickly
- 106SQL databases commonly implement indexes using_____trees.
Hint
This structure supports efficient searches through sorted values.
Answer
binary
- 107An indexed lookup has logarithmic, or log n, rather than_____time complexity.
Hint
Without an index, the database may scan rows one by one.
Answer
linear
- 108A primary key column is typically indexed_____by the database.
Hint
The database needs efficient access to unique identifiers.
Answer
automatically
- 109Indexes improve read lookups but can slow down_____operations.
Hint
The index must be updated when data changes.
Answer
write
- 110Indexes should generally be added to columns that are frequently used for_____.
Hint
A WHERE condition on a commonly searched column is a typical use case.
Answer
lookups
- 111A multi-column index is ordered by its_____column first.
Hint
The order of indexed columns affects which queries benefit most.
Answer
first
- 112Database denormalization intentionally introduces duplicate data to_____queries.
Hint
It is considered when joins or aggregations become too slow.
Answer
speed up
- 113A database backup strategy commonly creates periodic_____of the production database.
Hint
These are copies taken daily or hourly for recovery.
Answer
snapshots
- 114An append-only log records changes without modifying or removing previous_____.
Hint
It preserves the history of creation and deletion events.
Answer
entries
- 115A soft delete marks a record as deleted instead of actually_____it from the database.
Hint
A deleted-at column is often used for this strategy.
Answer
removing
- 116SQL injection occurs when untrusted input is allowed to alter the structure of a SQL_____.
Hint
An attacker may inject an additional statement such as DROP TABLE.
Answer
query
- 117A semicolon in SQL indicates that a statement has been_____.
Hint
An injected semicolon can cause later text to be interpreted as another statement.
Answer
terminated
- 118SQL injection is best prevented by using a database library that safely handles value_____.
Hint
The library should sanitize dynamic values rather than using raw string concatenation.
Answer
interpolation
- 119Developers should avoid inserting dynamic values into SQL using ordinary string_____.
Hint
This practice can allow malicious input to become executable SQL.
Answer
concatenation

Ask anything
We've read this whole study set, so questions about it get the best answers.