This last secret is but one checking one a beneficial NodeId can also be take part in a romance once the a dad
You will find the 2 tables less than, how-to demand constaint you to Nodes that have NodeTypeId 2 (CannotBeParent) cannot be a father in the place of cause?
Modified because of the gao.seng Wednesday,
Responses
PM
I’d begin by incorporating a banner so you can table [NodeTypes], to suggest if for example the node method of is participate as the mother within the a romance.
Observe that I am also including a different sort of restriction by the (NodeTypeId, CanBeParent). It is redundant, however it will allow us to later have fun with a foreign secret pointing so you can they.
The next thing is always to incorporate it line and to table [Nodes], to make certain your partners (NodeTypeId, CanBeParent) is obtainable in desk [NodeTypes]. Continue Reading