Attributes and Constraints
6 important questions on Attributes and Constraints
What defines class & method constraints?
Methods constraints = pre and post-conditions per method, to be satisfied before invocation of the method, only by the instance on which operation is invoked
What class constraints are there
- usesful for identifying keys for DB design)
- e.g. Class ORDER, unique{....}
Attribute Constraints:
- domain specific
- Class MEMBER, count(ref_loan)<=5
What method constraints are there?
- Referential Integrity: end master & create dependent with cardinality 1
- Sequence: e.g. Are derived pre-conditions from the transition table
- Higher grades + faster learning
- Never study anything twice
- 100% sure, 100% understanding
What are multiple propagation constraints?
Constraints in class NEST
- marsu mother & father are different
- mother & father should be from same jungle: thus same country & continent
- mother & father should be from same country: thus same continent
- mother & father should be from same continent
- mother & father can be from anywhere: no constraint
What are multiple propagation rules?
3 customers are involved in 1 invoice line: One of delivery, order & invoice. Do you invoice to same customer as the one who placed the order?
YES = MP constraint
NO = use Alias
MP constraint: self.medicine.category = self.prescription.medicine.category
Alias: medicine is under category: fever medicine
What are recursive associations constraints?
A person should not be twice in the same team
A person should not be his/her own supervisor
Supervisor should not be supervised by someone in their team --> has to be looked through recursively
Either through constraints or aliasses: Use aliasses when: different preconditions and method body
The question on the page originate from the summary of the following study material:
- A unique study and practice tool
- Never study anything twice again
- Get the grades you hope for
- 100% sure, 100% understanding