SQL Database Course
- 63Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
63 questions
- 1A database is defined as any collection of_____information.
Hint
Think about what kind of information is typically grouped together in a database.
Answer
related
- 2A_____is software that helps users create and maintain a database on a computer.
Hint
Abbreviated as DBMS, this software handles CRUD operations and security.
Answer
database management system
- 3The acronym CRUD stands for Create, Read, Update, and_____.
Hint
The fourth operation removes data from the database.
Answer
Delete
- 4A relational database organizes data into one or more_____with columns and rows.
Hint
This structure is similar to a spreadsheet.
Answer
tables
- 5SQL stands for Structured_____Language.
Hint
The 'Q' in SQL indicates it is used to ask questions of a database.
Answer
Query
- 6A_____is a request made to the database management system for specific information.
Hint
Think of it like a Google search but for databases.
Answer
query
- 7Non-relational databases are also known as_____databases.
Hint
This term contrasts with SQL databases.
Answer
NoSQL
- 8In a relational database table, a_____uniquely identifies each row.
Hint
This key must be unique and not null for every record.
Answer
primary key
- 9A_____key has no mapping to anything in the real world, such as an auto-incremented employee ID.
Hint
This type of key is system-generated and has no intrinsic meaning outside the database.
Answer
surrogate
- 10A_____key is a primary key that has a real-world mapping, such as a Social Security Number.
Hint
This key exists in the real world and is used for identification outside the database.
Answer
natural
- 11A_____key is an attribute that stores the primary key of a row in another table, creating a relationship.
Hint
It links two tables together.
Answer
foreign
- 12When a primary key consists of two or more columns, it is called a_____key.
Hint
Also known as a compound key.
Answer
composite
- 13A column that defines a single attribute of a table is called a_____.
Hint
Vertical sections in a table.
Answer
column
- 14A horizontal entry in a table is called a_____.
Hint
Also known as a record.
Answer
row
- 15The SQL keyword_____is used to retrieve data from a database.
Hint
This is the most common SQL command.
Answer
SELECT
- 16SQL is a hybrid language that includes DDL, DML, DCL, and_____.
Hint
DQL stands for Data Query Language, used for querying data.
Answer
DQL
- 17MySQL is an example of a relational_____management system.
Hint
RDBMS stands for Relational Database Management System.
Answer
database
- 18The default port for MySQL is_____.
Hint
This port number is standard for MySQL connections.
Answer
3306
- 19To create a new database in MySQL, use the command: CREATE DATABASE_____;
Hint
Replace this with the actual name you want to give your database.
Answer
database_name
- 20The DESCRIBE command is used to display the structure of a_____.
Hint
It shows column names, data types, and constraints.
Answer
table
- 21To delete a table entirely, use the_____TABLE command.
Hint
This command removes both the table structure and its data permanently.
Answer
DROP
- 22The data type_____is used to store a fixed-length string of characters.
Hint
Variable character field; specify maximum length in parentheses.
Answer
VARCHAR
- 23The data type_____is used to store decimal numbers with specified precision.
Hint
Often used for monetary values where exact precision is needed.
Answer
DECIMAL
- 24The data type_____is used to store large binary objects like images or files.
Hint
Binary Large Object.
Answer
BLOB
- 25To insert a new row into a table, use the_____INTO statement.
Hint
This statement adds new records to a table.
Answer
INSERT
- 26When inserting data, if a column is omitted, it will store the value_____unless a default is set.
Hint
This represents the absence of a value.
Answer
NULL
- 27A constraint that ensures a column cannot store NULL values is called_____.
Hint
This constraint enforces that every row must have a value for that column.
Answer
NOT NULL
- 28A constraint that ensures all values in a column are different is called_____.
Hint
This prevents duplicate entries in that column.
Answer
UNIQUE
- 29To automatically generate sequential numbers for a primary key, use the_____attribute.
Hint
Commonly used with integer primary keys to avoid manual entry.
Answer
AUTO_INCREMENT
- 30To set a default value for a column, use the_____keyword in the column definition.
Hint
This provides a fallback value when no value is specified.
Answer
DEFAULT
- 31The UPDATE statement is used to modify_____rows in a table.
Hint
It changes data already stored in the table.
Answer
existing
- 32In an UPDATE statement, the WHERE clause specifies which_____to modify.
Hint
Without WHERE, all rows are affected.
Answer
rows
- 33To remove rows from a table, use the_____FROM statement.
Hint
This statement deletes one or more rows based on a condition.
Answer
DELETE
- 34In a SELECT statement, the asterisk (*) means select all_____.
Hint
It returns every column from the table.
Answer
columns
- 35To sort the result set, use the_____BY clause.
Hint
This clause arranges rows in ascending or descending order.
Answer
ORDER
- 36To return only a specific number of rows from a query, use the_____clause.
Hint
This is useful for pagination or testing.
Answer
LIMIT
- 37The_____keyword is used with WHERE to match values against a list of values.
Hint
It is a shorthand for multiple OR conditions.
Answer
IN
- 38To retrieve unique values from a column, use the_____keyword.
Hint
It eliminates duplicate rows from the result.
Answer
DISTINCT
- 39The_____function returns the number of rows in a result set.
Hint
It can be used with * or a specific column.
Answer
COUNT
- 40To calculate the average of a numeric column, use the_____function.
Hint
This function returns the mean value.
Answer
AVG
- 41To calculate the total sum of a numeric column, use the_____function.
Hint
This function adds up all values.
Answer
SUM
- 42The_____clause is used with aggregate functions to group rows that have the same values in specified columns.
Hint
It divides the result set into groups of rows.
Answer
GROUP BY
- 43In SQL, the_____keyword is used for pattern matching with wildcards.
Hint
It is used in WHERE clauses to search for a pattern.
Answer
LIKE
- 44The wildcard character_____matches any single character in a LIKE pattern.
Hint
It represents exactly one unspecified character.
Answer
_
- 45The wildcard character % matches any sequence of_____characters in a LIKE pattern.
Hint
It can match 0 or more characters.
Answer
zero or more
- 46The UNION operator combines the result sets of two or more_____statements.
Hint
All queries must have the same number of columns.
Answer
SELECT
- 47A JOIN that returns only rows with matching values in both tables is called an_____JOIN.
Hint
Also known as a simple JOIN.
Answer
INNER
- 48A LEFT JOIN returns all rows from the_____table and matching rows from the right table.
Hint
Non-matching rows from the right table have NULL values.
Answer
left
- 49A RIGHT JOIN returns all rows from the_____table and matching rows from the left table.
Hint
Opposite of LEFT JOIN.
Answer
right
- 50A subquery is a query nested inside another query, often used with the_____keyword or equality operators.
Hint
It allows you to use the result of one query as a condition in another.
Answer
IN
- 51In MySQL, ON DELETE_____sets the foreign key column to NULL when the referenced row is deleted.
Hint
Alternative to CASCADE for non-primary key foreign keys.
Answer
SET NULL
- 52In MySQL, ON DELETE_____deletes the row in the child table when the referenced row in the parent table is deleted.
Hint
Used when the foreign key is part of the primary key or when you want the child row to be deleted automatically.
Answer
CASCADE
- 53A_____is a block of SQL code that automatically executes in response to certain events on a table, such as INSERT, UPDATE, or DELETE.
Hint
It can be set to run BEFORE or AFTER the event.
Answer
trigger
- 54In a trigger, the keyword_____refers to the new row being inserted or updated.
Hint
It allows access to column values of the new row.
Answer
NEW
- 55In an ER diagram, an entity is represented by a_____shape.
Hint
It is a basic building block of the diagram.
Answer
rectangle
- 56An attribute that can be broken down into smaller sub-attributes is called a_____attribute.
Hint
For example, a name attribute can be split into first name and last name.
Answer
composite
- 57A_____attribute can have multiple values for a single entity instance.
Hint
Represented by a double oval in ER diagrams.
Answer
multi-valued
- 58A_____attribute is one whose value can be derived from other attributes, so it does not need to be stored.
Hint
Represented by a dashed oval in ER diagrams.
Answer
derived
- 59In an ER diagram, a relationship is represented by a_____shape.
Hint
It connects entities and is labeled with a verb.
Answer
diamond
- 60In a binary relationship,_____participation means every instance of the entity must participate in the relationship, represented by a double line.
Hint
Opposite of partial participation.
Answer
total
- 61A weak entity is represented by a_____rectangle in an ER diagram.
Hint
It depends on a strong entity for its existence.
Answer
double
- 62When converting a 1:N binary relationship to a relational schema, the primary key of the_____side is added as a foreign key in the N-side table.
Hint
The side with cardinality '1' provides the foreign key.
Answer
1
- 63When converting an M:N binary relationship to a relational schema, a new_____is created with a composite primary key consisting of the foreign keys from both entities.
Hint
This new table also includes any attributes of the relationship.
Answer
table

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