Chapter 6 Questions

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

Each attribute of an entity becomes a(n) ________ of a table. A) column B) primary key C) foreign key D) alternate key

A

In many-to-many relationships between strong entities in a relational database design, which of the following is not true? A) The intersection table is ID-dependent on one of the parents B) The intersection table is ID-dependent on both of the parents C) The relationships from the intersection table to the parent tables are identifying relationships D) The maximum cardinality to the intersection table is always N

A

The identifier of the entity becomes the ________ of the corresponding table. A) primary key B) foreign key C) supertype D) subtype

A

When representing a one-to-many relationship in a relational database design, ________. A) the parent is always on the one side of the "one-to-many" relationship B) the child is always on the one side of the "one-to-many" relationship C) either parent or child can be on the one side of the "one-to-many" relationship, and the choice is arbitrary D) either parent or child can be on the one side of the "one-to-many" relationship, and special criteria indicate which table should be on the one side

A

When transforming an E-R data model into a relational database design, the key of the parent entity should be placed as part of the primary key into the child entity ________. A) when the child entity is ID-dependent B) when the child entity is non-ID-dependent C) when the child entity has a 1:1 relationship with the parent entity D) when the child entity has a 1:N relationship with the parent entity

A

When transforming an ID-dependent E-R data model relationship into a relational database design, the referential integrity constraints should allow ________. A) parent updates to cascade B) child updates to cascade C) child deletes to cascade D) Both A and B are correct

A

Which of the following is not true for an ideal primary key? A) a composite of several long attributes B) numeric C) fixed D) short

A

What are the four sets of minimum cardinalities that can be present in a 1:N binary relationship?

If we use the labels "Parent" and "Child" to represent, respectively, the one and many side of a 1:N relationship, we can then consider whether the parent and child must participate in the relationship. If one must participate, it is mandatory (M). If one does not have to participate it is optional (O). The four possible sets of minimum cardinalities are therefore: Parent optional and Child optional (O-O) Parent mandatory and Child optional (M-O) Parent optional and Child mandatory (O-M) Parent mandatory and Child mandatory (M-M)

Explain the representation of a many-to-many strong entity relationship in a relational database design.

Many-to-many relationships cannot be directly represented in a relational database design. Therefore, many-to-many relationships are essentially broken into two one-to-many relationships by creating an intersection table that represents the relationship itself. The intersection table takes its key as a combination of the keys of the two original, or parent, entities. Each of the parent entities has a one-to-many relationship with the intersection table that is represented by placing the keys of the parents into the intersection table.

Explain the representation of a one-to-many strong entity relationship in a relational database design.

One-to-many relationships are represented by placing the primary key of the table on the one side of the relationship into the table on the many side of the relationship as a foreign key. The term parent refers to the table on the one side of a 1:N relationship, and the term child refers to the table on the many side of the 1:N relationship. Therefore, the rule for representing a one-to-many relationship can be summarized as "Place the key of the parent table in the child table as a foreign key."

How are one-to-one recursive relationships addressed using the relational model?

One-to-one recursive relationships are addressed just the same as one-to-one nonrecursive relationships. The only difference is that both of the related entity instances are in the same entity class. The key of either instance is placed in the other instance as a foreign key. In the case of a recursive relationship, this means that a new attribute is added to the entity class with a recursive relationship. For each instance, this new attribute will contain the value of the key attribute of the instance that is related.

Explain the pragmatic reason for using surrogate keys.

Primary keys are commonly included in indexes, and are used to identify records to be retrieved by users. The ideal primary key is short, numeric and fixed. When the primary key contains a lengthy text field, this creates a large amount of duplicated data that must be frequently manipulated. For these reasons, it is often practical to use a surrogate key that is generated by the system and is relatively small and easy to manipulate.

Using the VRG database as an example, briefly describe what a final database design consists of.

The obvious part of the database design is the ER drawing itself, for example as shown for VRG in Figure 6-39. However, this needs to be accompanied by a summary of the database design relationships as shown in Figure 6-40. This document summarizes the cardinalities of relationships. For each relationship, we need a set of actions to enforce the minimum cardinalities. These can be based on Figures 6-28(a) and 6-28(b), the examples for VRG are shown in Figures 6-41 and 6-42. Finally, we need a set of column characteristics for each table, as shown in Figure 6-43 for VRG.

Briefly describe the process of converting an extended E-R model into a relational database design.

To convert an extended E-R model into a relational database design, first tables and columns must be defined for each entity attribute. The attributes of the entity are represented as the columns of the table. Primary keys are then selected for each table, after which the relationships between the entities are represented through the creation of foreign keys. Next, constraints are specified. Finally the normalization is verified.

A referential integrity constraint policy that insures that foreign key values in a table are correctly maintained when there is a change to the primary key value in the parent table is called ________. A) incremental updates B) incremental deletes C) cascading updates D) cascading deletes

C

A surrogate key should be considered when ________. A) A relationship is N:M B) A composite key is required C) The key contains a lengthy text field D) The key contains a number

C

In many-to-many relationships in a relational database design, ________. A) the key of the child is placed as a foreign key into the parent B) the key of the parent is placed as a foreign key into the child C) the keys of both tables are placed in a third table D) the keys of both entity tables are placed in each other

C

In relational database design, ID-dependent entities are not used to ________. A) represent N:M relationships B) handle associative relationships C) represent relationships where the child identifier does not include the key of the parent D) handle archetype/instance relationships

C

The first step in transforming an extended E-R model into a relational database design is to ________. A) create a table for each relationship B) evaluate the entities against the normalization criteria C) create a table for each entity D) remove any recursive relationships

C

Which of the following is not true about a NULL attribute? A) On insertion, entering the data for that field is optional. B) It is an important property of an attribute. C) It must have a default value specified. D) A primary key can't be NULL.

C

Which of the following is not true about surrogate keys? A) They are identifiers that are supplied by the system, not the users. B) They have no meaning to the users. C) They are non-unique within a table. D) They can be problematic when combining databases.

C

A referential integrity constraint policy that guarantees that a row in a parent table always has a required entry in a child table ________. A) is known as a minimum cardinality enforcement action B) needs to be documented by the database development team C) is enforced in most DBMS products D) Both A and B are correct

D

A referential integrity constraint policy that insures that all rows containing a particular foreign key value in a table are eliminated from the table when the row containing the corresponding primary key value in a parent table is eliminated from the database is called ________. A) incremental updates B) incremental deletes C) cascading updates D) cascading deletes

D

For the M-O (parent mandatory, child optional) case, what action(s) should be taken to ensure minimum cardinality is maintained? A) Define referential integrity constraint from child to parent B) Make foreign key NOT NULL C) Will require trigger or other application code D) Both A and B are correct

D

In a supertype-subtype structure, discriminator attributes ________. A) are easily represented in a relational design B) cannot be represented in a relational design C) require application logic to determine which subtypes correspond to a specific supertype instance D) Both B and C are correct

D

Many-to-many relationships are represented by ________. A) two tables with an M:N relationship B) two tables with a 1:N relationship C) an intersection table which has M:N relationships with the two tables D) an intersection table which has 1:N relationships with the two tables

D

The binary constraint MUST NOT indicates that ________. A) a specific binary relationship must not be included in a ternary relationship B) a table includes values that must not occur in a binary relationship C) a table includes values that must not occur in a ternary relationship D) a binary relationship includes value combinations that must not occur in a ternary relationship

D

When transforming an ID-dependent E-R data model relationship into a relational database design and the parent entity has a surrogate primary key and the child entity has a data identifier, then the primary key of the child table should be ________. A) the parent's surrogate key + the child's data key B) the parent's surrogate key + a surrogate key in the child C) either A or B will work, but method A is preferable D) either A or B will work, but method B is preferable

D

Which of the following is not a step in the database design process? A) Create tables and columns from entities and attributes B) Select primary keys C) Represent relationships D) Create constraints and triggers

D

Which of the following is not true about N:M recursive relationships? A) Both foreign keys in the intersection table refer to the same table. B) Since it is a recursive relationship, an intersection table is not needed. C) The foreign keys in the intersection table can't refer to the same attribute in the parent table. D) Both B and C are correct.

D

Which of the following is not true of recursive relationships? A) When the recursive relationship is M:N, an intersection table is created. B) The rows of a single table can play two different roles. C) Recursive relationships can be 1:1, 1:N, or M:N relationships. D) When the relationship is 1:N, a new table must be defined to represent the relationship.

D

What is an association relationship and how does it differ from an N:M relationship?

An association relationship is very similar to an N:M relationship except that the intersection table has attributes of its own. This means that in addition to the foreign key fields linking to the two strong entities, there is at least one additional field in what would otherwise be called the intersection table but is now an association table. For example, intersection table ENROLLMENT for STUDENT and CLASS showing student enrollment in each class would normally have two columns: StudentID and ClassID. However, we can turn this intersection table into an association table by adding the column Grade, which records each student's grade in each class.

In a relational database design, all relationships are expressed by ________. A) creating a primary key B) creating a foreign key C) creating a supertype D) creating a subtype

B

The binary constraint MUST COVER indicates that ________. A) a specific binary relationship must be included in a ternary relationship B) a binary relationship includes a set of value combinations that must all occur in a ternary relationship C) a table includes values that must occur in a binary relationship D) a table includes values that must occur in a ternary relationship

B

To represent a one-to-many relationship in a relational database design, ________. A) the key of the child is placed as a foreign key into the parent B) the key of the parent is placed as a foreign key into the child C) an intersection table must be created D) the key of the table on the "many" side is placed in the table on the "one" side

B

When representing a 1:1 relationship in a relational database design, ________. A) the key of each table must be placed as foreign keys into the other B) the key of either table may be placed as a foreign key into the other C) the key of both tables must be the same D) the intersection table gets the key from both relations

B

Which of the following is not true about representing subtypes in a relational database design? A) One table is created for the supertype and one for each subtype. B) All of the attributes of the supertype are added to the subtype relations. C) The key of the supertype is made the key of the subtypes. D) An instance of the supertype may be related to one instance each of several subtypes.

B

Which of the following is not true of MUST constraint? A) It may be needed in ternary relationships to enforce special business rules. B) It can be expressed directly in a relational model. C) It must be enforced by program code. D) It requires that one entity be combined with another entity.

B

What are MUST NOT and MUST COVER constraints?

Both MUST NOT and MUST COVER constraints occur when working with three tables in a ternary relationship. When a MUST NOT constraint occurs, it indicates that one binary relationship of two of the tables contains combinations of values that are not allowed to occur in the ternary relationship. When a MUST COVER constraint occurs, it indicates that one binary relationship of two of the tables contains combinations of values that must all appear in the ternary relationship.


Conjuntos de estudio relacionados

Ch. 4 Communication and Physical Assessment

View Set