04

Topics: SQL, Foreign key, Referential integrity Pages: 18 (4586 words) Published: January 30, 2015
Chapter 4: Constraints

TRUE/FALSE

1.Constraints are rules used to enforce business rules, practices, and policies.

ANS:TPTS:1REF:91

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

ANS:TPTS:1REF:91

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

ANS:FPTS:1REF:93

4.A constraint name can consist of up to 10 characters.

ANS:FPTS:1REF:93

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

ANS:TPTS:1REF:93

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

ANS:FPTS:1REF:94

7.A foreign key constraint can only be created at the column level.

ANS:FPTS:1REF:94 | 99

8.A NOT NULL constraint can only be created at the column level.

ANS:TPTS:1REF:94

9.A constraint for a composite primary key must be created at the table level.

ANS:TPTS:1REF:96

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

ANS:TPTS:1REF:94

11.A constraint is always enforced at the table level.

ANS:TPTS:1REF:95

12.The table level approach can be used to create any constraint, except a CHECK constraint.

ANS:FPTS:1REF:94

13.A PRIMARY KEY constraint will make certain the column designated as the primary key does not contain a NULL value.

ANS:TPTS:1REF:95

14.The MODIFY clause is used with the ALTER TABLE command to add a PRIMARY KEY constraint to an existing table.

ANS:FPTS:1REF:96

15.Only one PRIMARY KEY constraint can exist for each table.

ANS:TPTS:1REF:97

16.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:TPTS:1REF:99

17.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:TPTS:1REF:100

18.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:FPTS:1REF:101

19.A UNIQUE constraint is the same as a PRIMARY KEY constraint, except that it will accept NULL values.

ANS:TPTS:1REF:102

20.A CHECK constraint requires that a data value meet a certain condition before the record is added to the database table.

ANS:TPTS:1REF:103

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

ANS:FPTS:1REF:103

22.A constraint can be added to a table after the table has been populated with data even if the existing data violates the constraint.

ANS:FPTS:1REF:104

23.A NOT NULL constraint is a special FOREIGN KEY constraint.

ANS:FPTS:1REF:105

24.With the exception of the NOT NULL constraint, constraints can be added to a table using the ADD clause of the ALTER TABLE command.

ANS:TPTS:1REF:104-105

25.Each column can only be included in one constraint.

ANS:FPTS:1REF:109

26.In the USER_CONSTRAINTS view, the constraint type for a PRIMARY KEY constraint will be listed as PK.

ANS:FPTS:1REF:110

27.The ALTER TABLE command can be used to disable a constraint.

ANS:TPTS:1REF:111

28.The ALTER TABLE command with the ENABLE clause can be used to enable a constraint.

ANS:TPTS:1REF:111

29.A constraint can be renamed using the ALTER TABLE command.

ANS:FPTS:1REF:111

30.When dropping a constraint, the user is always required to specify the name of the constraint being dropped.

ANS:FPTS:1REF:112-113

MODIFIED TRUE/FALSE

1.A Datatype is a rule used to ensure the accuracy of data stored in a database. _________________________

ANS:F, Constraint

PTS:1REF:91

2.A(n) constraint can be created during the creation of a database table or added to a table...
Continue Reading

Please join StudyMode to read the full document

You May Also Find These Documents Helpful

  • Essay on 04
  • Essay about 04 Utilization
  • 04 Spanish Empire Essay
  • PHP 04 mySQL Essay
  • Essay about Case 12 04
  • PEX 06 04 Essay
  • Tia11e 04 Sblab Essay
  • 04 TNA Course design Essay

Become a StudyMode Member

Sign Up - It's Free