You have received instructions to create a DataSet diagram that models a one-to-many relationship between patients and treatments as seen in the exhibit:
When you serialize instance of the created DataSet component you, you received the following XML:
<Patient>
<PatientID>526</PatientID>
<PatientName>Amy Walsh</PatientName>
</Patient>
<Treatment>
<TreatmentID> 1000</TreatmentID>
<PatientID>526</PatientID>
<Code>DTP</Code>
</Treatment>
The XLM should be as follows
<Patient>
<PatientID>526</PatientID>
<PatientName>Amy Walsh</PatientName>
<Treatment>
<TreatmentID> 1000</PatientID>
<Code>DTP</Code>
</Treatment>
</Patient>
What should you do to change the dialog box so that the XML in generated correctly?
A.
You should select the Treatment from the Parent Table list and the Patient from the Child Table list.
B.
You should select the Both Relation and Foreign Key Constraint option.
C.
You should select the Foreign Key Constraint Only option.
D.
You should select the Nested Relation option.
Explanation:
The Nested Relation option will indicate that elements that is the same as the child rows of the relation should be nested as child elements that corresponds to the parent row.Incorrect Answers:
A: You should not do this. A one-to-many relation exits between the patients and treatments.
B: This will show that no relation exits between the two tables.
C: This will create a foreign key constraint between the child table and the parent table.