Machine-translated by Google. Questions are authored in English.
Top

Data Models into Database Designs Questions and Answers

31.

The DBMS allows surrogate keys to be changed.

Answer: B

Correct answer: False

A surrogate key is assigned by the DBMS and is not made available for alteration. That immutability is the whole point: because the key never changes, no cascading update is ever needed and no reference to it can become stale. A key the application could change would forfeit that advantage.

Please log in or register to report this question.

32.

Cascading updates refers to child rows being automatically deleted when a parent row is deleted.

Answer: B

Correct answer: False

That describes cascading deletions. Cascading updates propagate a change in the parent’s primary key to the foreign key values referring to it. The two are separate options and are often set differently - cascading updates being harmless with a stable key, cascading deletions being a decision about whether children should survive their parent.

Please log in or register to report this question.

33.

When transforming an entity-relationship model into a relational database design, each entity is represented as a table.

Answer: A

Correct answer: True

This is the first rule of the transformation: one table per entity, one column per attribute, the identifier becoming the primary key. Relationships are then added as foreign keys, and many-to-many relationships require an intersection table of their own, which is the one place where a table appears without a corresponding entity.

Please log in or register to report this question.

34.

When the child entity is required, we are restricted from creating a new parent row without also creating a corresponding child row at the same time.

Answer: A

Correct answer: True

If the child is required, a parent cannot exist without one, so creating a parent alone would immediately violate the constraint. The two rows must be created together, which usually means within a single transaction. This is the mirror image of the required-parent case, where it is the child that cannot be created alone.

Please log in or register to report this question.

35.

(STREET ADDRESS, CITY, STATE, ZIP) is an ideal primary key.

Answer: B

Correct answer: False

A composite of four text columns is long, not numeric, and liable to change whenever someone moves or a postcode is revised - and every foreign key referring to it would have to change with it. An ideal primary key is short, numeric and seldom changing, which is exactly why a surrogate key is used instead.

Please log in or register to report this question.

36.

When the parent entity is required and the parent has a surrogate key, update actions can be ignored.

Answer: A

Correct answer: True

Update actions on a required parent exist to handle a change in its primary key, and a surrogate key never changes. With nothing to propagate, cascading updates have no work to do and the case can be disregarded. Delete actions still need thought, since removing a parent would orphan its children whatever kind of key it has.

Please log in or register to report this question.

37.

When the parent entity is required, a new parent row can always be inserted.

Answer: A

Correct answer: True

A parent needs no child in order to exist, whatever the child’s minimum cardinality demands of the parent, so a new parent row may always be inserted. It is the child that cannot be inserted freely when the parent is required, since it must have a parent to refer to.

Please log in or register to report this question.

38.

For every relationship, there are six possible referential integrity actions.

Answer: A

Correct answer: True

Three actions on the parent - insert, update and delete - and the same three on the child give six in all, and each must be considered separately when the referential integrity rules are worked out. Some will be permitted, some cascaded and some prohibited, and the choice follows from the minimum cardinalities.

Please log in or register to report this question.

39.

An ideal primary key is short, numeric and seldom changing.

Answer: A

Correct answer: True

Short so that indexes and foreign keys stay compact, numeric so that comparison is fast and the value is compact, and seldom changing so that references to it do not have to be updated. A surrogate key has all three by construction, which is the argument for using one rather than a natural key.

Please log in or register to report this question.

40.

SQL Server does not support the BEFORE trigger.

Answer: A

Correct answer: True

SQL Server provides AFTER triggers, which fire once the statement has completed, and INSTEAD OF triggers, which replace it - the latter being how a view that is not otherwise updatable is made updatable. There is no BEFORE trigger, which is a difference from Oracle worth remembering when porting code between the two.

Please log in or register to report this question.

Loading…

Other Subjects

Tags: Data Models into Database Designs Questions and Answers || Data Models into Database Designs MCQ Questions and Answers || Data Models into Database Designs GK Questions and Answers || Data Models into Database Designs GK MCQ Questions || Data Models into Database Designs Multiple Choice Questions and Answers || Data Models into Database Designs GK || GK on Data Models into Database Designs || Database Questions and Answers || Database MCQ Questions and Answers || Database GK Questions and Answers || GK on Database