Oracle 11G SQL 2nd Edition By Joan Casteel – Test bank
Chapter 4: Constraints
TRUE/FALSE
- Constraints are rules used to enforce business rules, practices, and policies. ANS: T PTS: 1 REF: 100
- Constraints are used to ensure the accuracy and integrity of the data contained in the database. ANS: T PTS: 1 REF: 100
- A constraint can only be created as part of the CREATE TABLE command. ANS: F PTS: 1 REF: 102
- A constraint name can consist of up to 10 characters. ANS: F PTS: 1 REF: 101
- A primary key is usually given the abbreviation _pk in the constraint name if the name is assigned by the user.
ANS: T PTS: 1 REF: 101
- Any constraint can be created at the table or the column level.
ANS: F PTS: 1 REF: 102
- A foreign key constraint can only be created at the column level.
ANS: F PTS: 1 REF: 102
- A NOT NULL constraint can only be created at the column level.
ANS: T PTS: 1 REF: 102
- A constraint for a composite primary key must be created at the table level.
ANS: T PTS: 1 REF: 103
- The CONSTRAINT keyword is required if the user is going to assign a name to a constraint.
ANS: T PTS: 1 REF: 102 11. A constraint is always enforced at the table level.
ANS: T PTS: 1 REF: 102
12. The table level approach can be used to create any constraint, except a CHECK constraint.
ANS: F PTS: 1 REF: 102
1
- A PRIMARY KEY constraint will make certain the column designated as the primary key does not contain a NULL value.
ANS: T PTS: 1 REF: 103
- The MODIFY clause is used with the ALTER TABLE command to add a PRIMARY KEY constraint to an existing table.
ANS: F PTS: 1 REF: 103
- Only one PRIMARY KEY constraint can exist for each table.
ANS: T PTS: 1 REF: 103
- 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.
ANS: T PTS: 1 REF: 106
- If a FOREIGN KEY constraint exists, then a record cannot be deleted from the parent table if that row is referenced by an entry in the child table.
ANS: T PTS: 1 REF: 108
- A FOREIGN KEY constraint will not allow a row containing a NULL value in the foreign key column to be added to the table.
ANS: F PTS: 1 REF: 106
- A UNIQUE constraint is the same as a PRIMARY KEY constraint, except that it will accept NULL values.
ANS: T PTS: 1 REF: 111
- A CHECK constraint requires that a data value meet a certain condition before the record is added to the database table.
ANS: T PTS: 1 REF: 112
Reviews
There are no reviews yet.