## 10. Quiz Questions

If you would like to look up the answers for the following quiz questions, you can check our discussion forum. If you don't find an answer in the forum, you may create a post asking for an answer to a particular question.

### 10.1. Question 1: Meaning of "one-to-one"

What does it mean to say that an association is "one-to-one"?

It means that it is (select one):

1. O Bidirectional

2. O Both functional and total

3. O Functional

4. O Both functional and inverse functional

### 10.2. Question 2: When to Check Referential Integrity

A referential integrity constraint for a reference property p with domain class C and range class D has to be checked whenever (select one or many):

1. ☐ An object of type C is destroyed.

2. ☐ The value of p is changed for some object of type C.

3. ☐ A new object of type C is created.

4. ☐ An object of type D is destroyed.

5. ☐ A new object of type D is created.

### 10.3. Question 3: Meaning of "Functional"

A unidirectional binary association is functional if and only if (select one):

1. O Each object of the source class is linked to at most one object of the target class.

2. O Each object of the target class is linked to at most one object of the source class.

3. O Each object of the source class is linked to at least one object of the target class.

4. O Each object of the source class is linked to exactly one object of the target class.

### 10.4. Question 4: Object Destruction Dependency

Assume that we have an object type `B` with a standard identifier attribute `id` and an object type `A` with an ID reference attribute `b_id` referencing `B::id`. Further, assume that there is an object `b` of type `B` with `b.id = 11` and an object `a` of type `A` referencing `b` with `a.b_id = 11`. Which of the following statements are correct? Select one or many:

1. ☐ The object `b` can be destroyed when the ID reference in object `a` is unassigned (by setting `a.b_id` to `undefined` in JS or to `null` in Java) and there is no other object that references `b`.

2. ☐ The object `a` can only be destroyed when `b` has been destroyed before.

3. ☐ The object `b` can be destroyed when the ID reference in object `a` is reset to another object of type `B`, e.g. by setting `a.b_id = 7` and there is no other object that references `b`.

4. ☐ The object `b` can be destroyed when `a` has been destroyed before.

### 10.5. Question 5: Rendering a Single-Valued Reference Property

Which of the following statements about a single-valued reference property p and how it should be rendered in a web user interface by a suitable form control are correct? Select one or many:

1. ☐ An adequate rendering is obtained by using an `input` control with `type="text"`.

2. ☐ If the cardinality of p's range is not greater than 7, it can be rendered by a check button group.

3. ☐ If the cardinality of p's range is not greater than 7, it can be rendered by a radio button group.

4. ☐ It can always be rendered by a single-`select` control.

### 10.6. Question 6: Expressing a Functionality Type

Which term of the form "x-to-y" (where x,y denote "one" or "many") can be used for expressing that an association is neither functional nor inverse functional?