Chapter 3: Introduction to relational databases and MySQL
Which of the following is NOT a common MySQL data type?
DBL
Which of the following can a SELECT statement NOT do to the data in a table?
Delete the rows
What type of SQL statement is used to assign user privileges in MySQL?
GRANT
To add a row to a table in a database, you use the SQL ________________ statement.
INSERT
Which of the following is NOT a common MySQL privilege?
INSERT TABLE
Which clause in a SQL statement is typically used to return data from more than one table?
JOIN
Which clause in a SQL statement specifies how the result set should be sorted?
ORDER BY
Which clause in a SQL statement specifies the columns to return?
SELECT
You use a SQL ________________ statement to retrieve data from a SQL database.
SELECT
When you code a DELETE statement, you usually need to include
a WHERE clause
A join that returns records from related tables only if their related fields match is called.
an inner join
An advantage of using MySQL is:
cost; ease of use; speed
The ________________ of a column in a database table determines what type of data can be stored in the column.
data type
What does a relational database use to relate the tables in a database to other tables?
foreign keys
When you code an INSERT statement, you don't have to include the data for a column that
has a default value
Which URL can be used to start phpMyAdmin on a local system?
http://localhost/phpmyadmin
An inner join combines data from two or more tables in which the related fields ________________.
match are equal are the same
The most common type of relationship between tables in a relational database is a ________________ relationship.
one-to-many
If a row in one table is related to just one row in another table, the tables are said to have a
one-to-one relationship
What does a relational database use to uniquely identify each row in a table?
primary keys
To control what users can do with a database, SQL can be used to create users and assign ________________ to them.
privileges
A table in a relational database consists of columns and ________________.
rows
phpMyAdmin can be used to import and run a SQL ________________ that creates one or more databases.
script
The result set retrieved by the following SELECT statement contains rows that have SELECT balance, number FROM accounts WHERE balance < 0
two of the columns from the accounts table where balance is less than 0
The column definition for a MySQL table can be used to determine all but one of the following. Which one is it?
what range of values the column can contain