HW 04 Study Set

¡Supera tus tareas y exámenes ahora con Quizwiz!

Which of the following statements about creating constraints is incorrect?

The NOT NULL constraint can be created at either the column level or table level.

A FOREIGN KEY constraint can be added to the column of a table to ensure that the referenced data value actually exists in the other table.

True

A primary key is usually given the abbreviation _pk in the constraint name if the name is assigned by the user.

True

A(n) FOREIGN KEY constraint can only reference a column in the parent table that has been designated as the primary key for that table. _________________________

True

A(n) UNIQUE constraint will allow NULL values to be stored in the designated column. _________________________

True

Any type of constraint for a single column can be created at the column level. _________________________​

True

Constraints are used to ensure the accuracy and integrity of the data contained in the database.

True

The CONSTRAINT keyword is required if the user is going to assign a name to a constraint.

True

Which of the following is the standard abbreviation for the constraint NOT NULL?

nn

A PRIMARY KEY constraint can be added to an existing table by using the ____ clause of the ALTER TABLE command.

ADD

If a PRIMARY KEY constraint, named ORDERITEMS_PK, exists for the ORDER# and ITEM# columns of the ORDERITEMS table, which of the following commands will disable the constraint?

ALTER TABLE orderitems DISABLE PRIMARY KEY CONSTRAINT orderitems_pk;

If a PRIMARY KEY constraint, named ORDERITEMS_PK, exists for the ORDER# and ITEM# columns of the ORDERITEMS table, which of the following commands will drop the constraint?​

ALTER TABLE orderitems DROP PRIMARY KEY;

If the constraints on the ORDER# and ITEM# columns of the ORDERITEMS table were created as a PRIMARY constraint, and the actual constraint name is not known, which of the following commands can be used to delete the constraint?​

ALTER TABLE orderitems DROP PRIMARY KEY;

Based on the structure of the PROMOTION table, which of the following commands will ensure that the value entered for the MINRETAIL column is less than the value entered for the MAXRETAIL column?​

ALTER TABLE promotion ADD CHECK (minretail < maxretail);

If the ____ keyword is included when a constraint is created, a constraint name must be provided by the user.

CONSTRAINT

Which of the following are used to enforce business rules?

Constraints

Which clause will allow you to disable a constraint?

DISABLE

A constraint can only be created as part of the CREATE TABLE command.

False

Any constraint can be created at the table or the column level.​

False

If the ON DELETE CASCADE keywords are included when a(n) PRIMARY KEY constraint is created, then if a row is deleted from the parent table, any corresponding records in the child table are also deleted. _________________________

False

The FOREIGN KEY constraint is usually placed on the "one" side of a one-to-many relationship. _________________________

False

The SYSDATE can be used as a condition in a CHECK constraint.

False

Where does the Oracle 12c server store information about objects in the database, including information about constraints?

In the data dictionary

The ____ constraint prevents the user from adding a NULL value in the specified column.

NOT NULL

Based on the structure of the ORDERITEMS table, which of the following commands will add a NOT NULL constraint to the ISBN column?

None of the above


Conjuntos de estudio relacionados

Psychology Chapter 10 Study Guide

View Set

PREP U CH. 27 DISORDERS OF CARDIAC FUNCTION AND HEART FAILURE

View Set

Unit 2 - Exploration & Early Colonization - Chapter 5

View Set

MTA 98-375 HTML5 Application Development Fundamentals CRASH COURSE BY OPEL65

View Set

Clinical Exercise ASU masters exam

View Set