3-1 Quiz

Ace your homework & exams now with Quizwiz!

During a casual discussion, your colleague claims that both data types and names of foreign and primary keys must be the same. Is this true or false? True False

False

For primary key deletions and updates, most databases support only the corrective action Restrict. True False

False

Your coworker has decided to take an online course about the basics of databases so that he can improve his job performance. As you study with him, he says that he thinks attributes are essential in an ER diagram. Is this true or false? True False

False

If you needed the database to select values in ascending order, which of the following clauses should you use along with the SELECT command? Select one answer. Order By NOT DESC Order By LIKE BINARY Order By ASCE Order By LIKE NIT Order By

Order By

When the action Cascade propagates the changes that were made to a primary key out to the associated foreign key, which of the following are the outcomes? Select all that apply. Rows containing invalid foreign keys are deleted when the primary key is deleted. Rows containing valid foreign keys are inserted when the primary key is inserted. Invalid foreign keys are set to the new primary key value when a primary key is updated. Rows containing valid foreign keys are deleted when the primary key is deleted. Rows containing valid foreign keys are inserted when the primary key is duplicated.

Rows containing invalid foreign keys are deleted when the primary key is deleted. Invalid foreign keys are set to the new primary key value when a primary key is updated.

Your cousin asks you to help her prepare for her computer science exam next week. She gives you two clues about a type of relational database key: No column values may be NULL, and columns must be necessary for uniqueness. Which type of key is she referring to? Select one answer. Simple primary key Alternate key Composite primary key Foreign key

Composite primary key

The four types of joins or SELECT statements that relational databases allow are listed below. Also listed are the combinations that these statements select from the database tables. Match each join type with its associated selected combination. Instructions: Choose your responses from the drop-down menus below. Responses cannot be used more than once. All left and right table rows, regardless of match Only matching left and right table rows Only matching right table rows but all left table rows Only matching left table rows but all right table rows 1. Inner join 2. Left join 3. Right join 4. Full join

1. Inner join ==> Only matching left and right table rows 2. Left join ==> Only matching right table rows but all left table rows 3. Right join ==> Only matching left table rows but all right table rows 4. Full join ==> All left and right table rows, regardless of match

Three actions that databases can take when autocorrecting foreign key insertions and updates are listed below. Limitations on databases for each action are listed as well. Instructions: Match each action to its associated limitation. Choose your responses from the drop-down menus below. Responses cannot be used more than once. It cannot be used when a foreign key is NOT NULL. It is applied when no action is specified. The value specified for it must be a valid primary key. 1. Restrict 2. Set Null 3. Set Default

1. Restrict ==> It is applied when no action is specified. 2. Set Null ==> It cannot be used when a foreign key is NOT NULL. 3. Set Default ==> The value specified for it must be a valid primary key.

There are four actions and outcomes listed below. These four actions can be implemented on a database to autocorrect violations of referential integrity. Match the action name with the outcome. Sets invalid foreign keys to a default primary key value, specified in SQL Propagates primary key changes to foreign keys Rejects an insert, update, or delete Sets invalid foreign keys to NULL 1. Restrict 2. Set Null 3. Set Default 4. Cascade

1. Restrict ==> Rejects an insert, update, or delete 2. Set Null ==> Sets invalid foreign keys to NULL 3. Set Default ==> Sets invalid foreign keys to a default primary key value, specified in SQL 4. Cascade ==> Propagates primary key changes to foreign keys

How can referential integrity be violated? Select all that apply. A primary key is inserted. A row containing a primary key is deleted. A foreign key is updated. A row containing a foreign key is deleted. A primary key is updated. A row containing a foreign key is inserted.

A primary key is updated. A foreign key is updated. A row containing a primary key is deleted. A row containing a foreign key is inserted.


Related study sets

A&P Chapter 14 The Autonomic Nervous System and Homeostasis

View Set

Физика, Кинематика, 9 класс

View Set

Chapter 4: Forces and Newton's laws of motion, Mastering Physics 4, physics exam 2

View Set

Chapter 8 - Designing Pay Levels

View Set