Experts-
Please assist with this constraint problem. (Here I'm simplifying the problem that I described in the longer post linked-to at the link at the end of this message.)
Suppose I have the following tables to support a web application that allows members of an organization to sign up for activities. The activities that a member is allowed to sign up for is constrained by the activities "enabled" for the group that the member belongs to. The table relationships are:
SIGNUP <-- MEMBER --> GROUP --> GROUP-ACTIVITY <-- ACTIVITY
(the arrows point to the "many" in one-to-many relationships.)
Suppose we have:
When member_a goes to sign up for an activity (by adding a record to child table SIGNUP), I only want member_a to be able to sign up for hiking. I don't even want member_a to SEE the biking activity in the signup interface.
My problem is that I'm not sure how to approach this problem. My best guess is that I could make a single set that includes all these tables and then somehow leverage the set to set constraints on members' activities choices, but I'm not sure how to do this or even if the single set is the best approach. Your help is much appreciated!
-Kurt
The problem in detail is here:
https://forum.alphasoftware.com/showthread.php?t=76582
Please assist with this constraint problem. (Here I'm simplifying the problem that I described in the longer post linked-to at the link at the end of this message.)
Suppose I have the following tables to support a web application that allows members of an organization to sign up for activities. The activities that a member is allowed to sign up for is constrained by the activities "enabled" for the group that the member belongs to. The table relationships are:
SIGNUP <-- MEMBER --> GROUP --> GROUP-ACTIVITY <-- ACTIVITY
(the arrows point to the "many" in one-to-many relationships.)
Suppose we have:
- 2 records in table GROUP: group_a and group_b.
- 2 records in table ACTIVITY: hiking and biking.
- For group_a, there is one record child record in GROUP-ACTIVITY. This record links it to the activity hiking. group_b has no records in GROUP-ACTIVITY.
- We have 2 people in table MEMBER: member_a and member_b.
- member_a belongs to group_a, and member_b belongs to group_b.
When member_a goes to sign up for an activity (by adding a record to child table SIGNUP), I only want member_a to be able to sign up for hiking. I don't even want member_a to SEE the biking activity in the signup interface.
My problem is that I'm not sure how to approach this problem. My best guess is that I could make a single set that includes all these tables and then somehow leverage the set to set constraints on members' activities choices, but I'm not sure how to do this or even if the single set is the best approach. Your help is much appreciated!
-Kurt
The problem in detail is here:
https://forum.alphasoftware.com/showthread.php?t=76582
Comment