Problem

The Is Married To relationship in Figure 2-12a would seem to have an obvious answer in P...

The Is Married To relationship in Figure 2-12a would seem to have an obvious answer in Problem and Exercise 11d— that is, until time plays a role in modeling data. Draw a data model for the PERSON entity type and the Is Married To relationship for each of the following variations by showing the appropriate cardinalities and including, if necessary, any attributes:

a. All we need to know is who a person is currently married to, if anyone. (This is likely what you represented in your answer to Problem and Exercise 11d.)

b. We need to know who a person has ever been married to, if anyone.

c. We need to know who a person has ever been married to, if anyone, as well as the date of their marriage and the date, if any, of the dissolution of their marriage.

d. The same situation as in c, but now assume (which you likely did not do in c) that the same two people can remarry each other after a dissolution of a prior marriage to each other.

e. In history, and even in some cultures today, there may be no legal restriction on the number of people to whom one can be currently married. Does your answer to part c of this Problem and Exercise handle this situation or must you make some changes (if so, draw a new ERD).

Reference Problem and Exercise 11d

Add minimum and maximum cardinality notation to each of the following figures, as appropriate:

d. Figure 2-12 (all parts)

Step-by-Step Solution

Solution 1

Draw the data model for entity type and its relationship

Data model:

Data model is the representation of object by different graphic symbols and it illustrates the relationship between the objects.

• It converts the complex system design into the understood representation of data flows and processes.

• Entity, attribute and relationship are the three basic elements of data model.

a) Data model for PERSON entity currently married:

The data model diagram shows the unary relationship for the PERSON entity as shown below:

C:\Users\300889\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.Outlook\XNEWY8E1\10943-2-12PE_fig1.jpg

Explanation:

In the above data model,

• PERSON is one and only entity in the data model.

• The relationship between the person is,

o A person is married to only one person “Is Married To”.

• Here, the representation of the cardinality relationship is “optional one”.

• The identifier of the PERSON entity is Person ID.

• The attribute of the PERSON entity is Person Name.

b) Data model for PERSON entity who has ever married:

The data model diagram shows the unary relationship for the PERSON entity as shown below:

C:\Users\300889\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.Outlook\XNEWY8E1\10943-2-12PE_fig2.jpg

Explanation:

In the above data model,

• PERSON is one and only entity in the data model.

• The relationship between the person is,

o A person may or may not marry to number of persons “Is Married To”.

• Here, the representation of the cardinality relationship is “optional many”.

• The identifier of the PERSON entity is Person ID.

• The attribute of the PERSON entity is Person Name.

c) Data model for PERSON entity who has ever married as well as marriage date:

The data model diagram shows the unary relationship for the PERSON entity as shown below:

C:\Users\300889\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.Outlook\XNEWY8E1\10943-2-12PE_fig3.jpg

Explanation:

In the above data model,

• PERSON is one and only entity in the data model.

• The relationship between the person is,

o An individual may or may not marry to number of persons “Is Married To”.

o If the person dissolved their marriage then the person may or may not marry to number of persons.

o Here, the dashed relationship line indicates that the PERSON does not include the identifiers of “Marriage Date” and “Dissolution Date” of the related entities.

• Here, the representation of the cardinality relationship is “optional many”.

• The identifier of the PERSON entity is Person ID.

• The attribute of the PERSON entity is Person Name.

• An effective time attribute is used to record the Marriage Date and Dissolution Date.

d) Data model for PERSON entity who has remarried after dissolution:

The data model diagram shows the PERSON entity and MARRIAGE entity as shown below:

C:\Users\300889\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.Outlook\XNEWY8E1\10943-2-12PE_fig4.jpg

Explanation:

In the above data model,

• PERSON and MARRIAGE is two entities in data model.

• The relationship between the person and marriage is,

o The relationship between the PERSON and MARRIAGE is “Participates” and its cardinality relationship is “Mandatory one to optional many”.

o Another relationship between the PERSON and MARRIAGE is “Partners” and its cardinality relationship is “mandatory one to optional many”.

• Here, the representation of the cardinality relationship is “mandatory one to optional many”.

• The identifier of the PERSON entity is Person ID.

• The attribute of the PERSON entity is Person Name.

• The identifier of the MARRIAGE entity is Marriage Date. Here, the Marriage Date is a partial identity denotes in double dash.

• The attribute of the MARRIAGE entity is Dissolution Date.

The MARRIAGE entity contains the attributes of Marriage Date and the two Person IDs are mentioned as a full composite identifier.

• The two same people who are not get married, re-married or dissolved on the same marriage date.

• This situation is solved by adding the attribute Marriage Time.

e) Any restriction for PERSON entity who has remarried after dissolution:

• The solution in the Problems and Exercises 12 (d) section, data model for PERSON entity who has remarried after dissolution diagram does not mention that one person is to be married to one person.

• So, there are no restrictions found about the number of marriages that can be done by number of persons.

Therefore, data model for PERSON entity who married again after the dissolution diagram in Problems and Exercises 12 (d) section is sufficient and the legal restrictions may arise.

Add your Solution
Textbook Solutions and Answers Search