I have two (linked) questions about class diagrams UML and SQL.
FIRST: ABOUT UML In class diagram UML can i have ternary associations with recursion? I mean something like this:
(ternary association with recursion)
If it is possible, how have i to implement it in SQL? Should i have a unique table with three attributes (one for each class involved)?
SECOND: ABOUT SQL How to implement association cardinality? Suppose to have a situation like this:
How can i ensure that each instance of class A is associated with two and only two instances of class B?