Good query, for those who loaned a tool to a pupil that machine could be deleted as a result of it’s outdated, do you wish to delete that the mortgage ever existed?
Now, that is the place “It is a part of” will get a bit of difficult on this particular state of affairs. It is tempting to suppose that “Pay” needs to be “a part of” “college students” or “Units.” Nonetheless, a cost file actually is dependent upon each a pupil and a tool.
Here is why utilizing “It is a part of” for “Pay” might not be best:
- Information integrity: If “Pay” is “a part of” “College students”, deleting a pupil would delete their cost information. This implies you’ll lose the historical past of which gadgets they reviewed. The identical downside arises if “Pay” is “a part of” “Units”.
- Logical relationship: A cost isn’t truly “owned” by both the scholar or the machine. It represents a short lived affiliation between the 2.
A greater method:
As an alternative of “It’s a part of”, use common references (Ref) in your “Pay” desk:
- Scholar ID (Ref): This column references the “College students” desk, linking every cost file to a selected pupil.
- Machine ID (reference): This column references the “Units” desk, linking every cost file to a selected machine.
How does this work:
- Clear hyperlinks: Your “Fee” desk clearly reveals which pupil has checked out which machine.
- Information preservation: Deleting a pupil or machine won’t robotically delete cost information. You retain cost historical past.
- Flexibility: You may simply add extra particulars to the “Fee” desk, equivalent to cost date, due date, and return date.
AppSheet is a part of:
Whereas “It is a part of” is beneficial for parent-child relationships, the cost app in your machine requires a extra balanced relationship between the three tables. Utilizing references (Ref) offers the flexibleness and knowledge integrity you want for this state of affairs.