How to design properly a membership history accross multiple groups?
0
votes
1
answer
37
views
I'm looking to design an application (Python with sqlite) which deals with some contributors moving across several groups through time.
My design looks currently like (PK in bold weight, FK in italic, both if a FK is part of the PK):
* Group(**Id**, Name)
* Contributor(**Id**, Name, FirstName)
* Action(**ActionId**, Name)
* ContributorAction (***ContributorId***, ***ActionId***, Date)
* Membership (***GroupId***, ***ContributorId***, **StartDate**, **EndDate**)
My aim is to keep an history of memberships in order to retrieve the right membership group of a contributor at the time of a given contribution.
Doing that involve the use of date columns in a primary key (Membership table). However,
EndDate
could be NULL
for the current membership of a contributor, and I read this could be not a good (or even permitted) practice.
Did I miss something here to get at least 3NF design?
Asked by Amessihel
(103 rep)
Dec 23, 2024, 04:22 PM
Last activity: Dec 23, 2024, 04:49 PM
Last activity: Dec 23, 2024, 04:49 PM