Chapter 11 Study Questions Flashcards

1
Q

The ____________ statement consists of the name of a new table, followed by the names, and data types of its columns.

A

create table

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

___________ are used to enforce integrity of the data in a table by defining rules about the values that can be stored in the columns of the table.

A

constraints

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

A(n) ___________________ is coded as part of the definition of a column it constrains.

A

column-level constraint

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

A(n) _________________ is coded as if it is a separate column definition, and the columns it constrains are named within that definition.

A

table-level constraint

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

A(n) ___________________ prevents null values from being stored in a column.

A

not null constraint

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

A(n) ___________ requires that each row has a unique value in the column but allows null values to be stored in the column or columns for the primary key and it does not allow null values.

A

unique constraint

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

A(n) __________________ requires values in one table to match values in another table.

A

foreign key constraint

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

A(n) __________________ is used to define the relationships between tables and enforce referential integrity.

A

foreign key constraint

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

With a(n) _________________ when a row is deleted from the primary key table, rows are automatically deleted from the foreign key table.

A

on delete cascade

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

The _________ statement may be used to add, drop, or modify the columns of an existing table.

A

alter table

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

The ___________ statement can be used to change the name of an existing table.

A

rename table

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

Tot remove a table from the current database, issue a ___________ statement.

A

drop table

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

The ______________ statement can be used to delete all data from a table.

A

truncate table

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

A(n) _____ speeds up joins and searches by providing a way to go directly to a row rather than having a script.

A

index

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

A(n) ______ is a file that contains one or more SQL statements.

A

script

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

The _________ that is used by a database, table, or column determines which characters can be stored and how many bytes are used to store the characters.

A

character set

17
Q

Every character set has a corresponding _________ that determines how the characters within the set are sorted.

A

collation

18
Q

A(n) ________________ determines how MySQL stores data and which database features are available for use.

A

storage engine