Relationship Analysis: Patient Information, Signs, and Recommendations

Verified

Added on  2019/09/16

|2
|505
|176
Homework Assignment
AI Summary
This assignment delves into the relationships between patient information, signs, and recommendations within an AI context. The solution addresses the relationships, specifically focusing on the mandatory nature of patient-sign relationships, the use of composition relationships between classes like Signs and Sign_Recommendation, and Recommendation and Sign_Recommendation. The assignment further explores the reasoning behind these relationships, including the dependency between signs and recommendations, and the implications of the 'black diamond' notation indicating composition. The solution also clarifies the role of the Main window class in the application, providing a comprehensive analysis of the design choices and their rationale. The assignment provides detailed explanations of the database design, including the use of primary keys, foreign keys, and aggregation relationships, providing a complete understanding of the database design. It also addresses potential alterations to the relationship between signs, sign-recommendation and recommendation to aggregation from composition.
Document Page
1. Is the relation between Patient_inforamtion and Signs classes, is a One-to-many and
mandatory. Because the patient has zero or more signs and also one signs belong to zero or
multiple patients. My question, is the above relationship correct and explain what we want?
Answer: a person will only be a patient if he or she has one or more signs. If they do not
have any signs, why would their information be registered as a patient. Rest I have
corrected. You are right that a sign may belong to zero or more patients.
2. Can you please explain, why are there a composition relationship between Signs and
Sign_Recommendation classes?
Answer: this is a composition because sign_recomendation class cannot exist independently.
Since you have created both recommendation_id and sign _id as a primary key together
hence they cannot hold null values. If they would have been just foreign keys, or
signs_recommendation table would not have been there, then we would have created an
aggregation or association relationship.
3. Can you please explain, why are there a composition relationship between Recommendation
and Sign_Recommendation classes?
Answer: this is a composition because sign_recomendation class cannot exist independently.
Since you have created both recommendation_id and sign _id as a primary key together
hence they cannot hold null values. If they would have been just foreign keys, or
signs_recommendation table would not have been there, then we would have created an
aggregation or association relationship.
4. Why the black diamond to (or next to) Signs and Recommendation classes?
Answer: diamond is black because of composition relationship. They both are container/
composite classes. Please check your notes
5. Can you please explain the reason for choosing the relation between the
Sign_Recommendation and Recommendation classes?
Answer: due to dependency between them. Since signs are there hence recommendations
are there. But the same recommendation can be used for one or more signs.
You can say that I have assumed that each sign exists in the database must have a
recommendation for it. And each sign may have one or more recommendation or each
recommendation can be associated with one or more signs.
6. Can you please explain the reason for choosing the relation between the
Sign_Recommendation and Signs classes?
Answer: same as 5.
7. What the target of Main window? Does the Main window class or not?
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Answer: yes main window is a class. But it will not have any functions. We can say it is the
one which will hold the “void main()” function, that is the base function to call other classes
or to begin the application.
Note: If you still have any issues I can change relationship between sign, sign-
recommendation and recommendation to aggregation from composition.
chevron_up_icon
1 out of 2
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]