Chapter 7 Flashcards
The SQL CREATE TABLE statement is used to name a new table and describe the table’s columns.
True
The SQL keyword CONSTRAINT is used to define one of five types of constraints.
True
The SQL keyword PRIMARY KEY is used to designate the column(s) that are the primary key for the table.
True
The SQL keyword CONSTRAINT is used to limit column values to specific values.
True
The SQL keyword CONSTRAINT is used in conjunction with the SQL keywords PRIMARY KEY and FOREIGN KEY.
True
One advantage of using the CONSTRAINT command to define a primary key is that the database designer controls the name of the constraint.
True
The SQL keyword UNIQUE is used to define alternative keys.
True
If the table PRODUCT has a column PRICE, and PRICE has the data type Numeric (8,2), the value 98765 stored in that field will be displayed by the DBMS as 98765.00.
False
If the table ITEM has a column WEIGHT, and WEIGHT has the data type Numeric (7,2), the value 4321 with be displayed by the DBMS as 43.21.
True
The SQL keyword CHECK is used to limit column values to specific values.
True
The SQL keyword MODIFY is used to change the structure, properties or constraints of a table.
False
Data values to be added to a table are specified by using the SQL VALUES clause.
True
The SQL keyword DELETE is used to delete a table’s structure.
False
When the correct SQL command is used to delete a table’s structure, the command can only be used with a table that has already had its data removed.
False
One or more rows can be added to a table by using the SQL INSERT statement.
True
Unless it is being used to copy data from one table to another, the SQL INSERT statement can be used to insert only a single row into a table.
True
Rows in a table can be changed by using the SQL UPDATE statement.
True
The SQL SET keyword is used to specify a new value when changing a column value.
True
The SQL keyword MODIFY is used to change a column value.
False
Rows can be removed from a table by using the SQL DELETE statement.
True
An SQL virtual table is called a view.
True
The SQL command CREATE USER VIEW is used to create a virtual table.
True
Which SQL keyword is used to name a new table and describe the table's columns? A) SET B) CREATE C) SELECT D) ALTER E) CONSTRAINT
B
If the table PRODUCT has a column PRICE that has the data type Numeric (8,2), the value 12345 will be displayed by the DBMS as \_\_\_\_\_\_\_\_. A) 123.45 B) 12345 C) 12345.00 D) 123450.00 E) 00012345
A
Which SQL keyword is used to impose restrictions on a table, data or relationship? A) SET B) CREATE C) SELECT D) ALTER E) CONSTRAINT
E
One advantage of using the CONSTRAINT phrase to define a primary key is that the database designer controls the \_\_\_\_\_\_\_\_. A) name of the primary key B) name of the foreign key C) name of the constraint D) A and B E) A, B, and C
C
The SQL keyword used to limit column values to specific values is \_\_\_\_\_\_\_\_. A) CONSTRAINT B) CHECK C) NOT NULL D) UNIQUE E) UPDATE
B
Which SQL keyword is used to change the structure, properties or constraints of a table? A) SET B) CREATE C) SELECT D) ALTER E) CONSTRAINT
D
Which SQL keyword is used to delete a table's structure? A) DELETE B) DROP C) DISPOSE D) ALTER E) MODIFY
B
When the correct SQL command is used to delete a table’s structure, what happens to the data in the table?
A) If the deleted table was a parent table, the data is added to the appropriate rows of the child table.
B) If the deleted table was a child table, the data is added to the appropriate rows of the parent table.
C) The data in the table is also deleted.
D) Nothing because there was no data in the table since only an empty table can be deleted.
E) A and B
C
Which SQL keyword is used to add one or more rows of data to a table? A) DELETE B) INSERT C) SELECT D) SET E) UPDATE
B
Which SQL keyword is used to change one or more rows in a table? A) MODIFY B) INSERT C) SELECT D) CHANGE E) UPDATE
E
Which SQL keyword is used to change the values of an entire column? A) CHANGE B) INSERT C) SELECT D) SET E) MODIFY
D
Which keyword is used to remove one or more rows from a table? A) DELETE B) INSERT C) ERASE D) SET E) UPDATE
A