Old structure:
The old ProgrammeMembership table structure was :
...
and the programmeMemberships under People menu in TIS are like (the user shown below are mocked instead of real user data):
...
So from above, we can see a person can have multiple programmeMemberships, and a programmeMembership can have multiple curriculumMemberships. But the old table has all information together, which means the table has lots of redundant programmeMembership data for curriculumMembersihp against one programmeMembership.
Under the old table structure, when we need to extract a real programmeMembership, we use personId
, programmeStartDate
, programmeEndDate
, programmeId
, programmeMembershipType
fields for identification. When there’s a field above with missing data(data issue), some problems occurs for querying all curriculum memberships against a specific programmeMembership.
Why the refactoring is necessary?
Distinction between 2 entities
Current(new) table structure:
...