I have a users table, and each user has a unique user_id. Each user also has a partner stored under partner. A user will have only one partner at a time, but he will have multiple partners of the course of time. I would like to maintain a list for every user of their past partners. How should I store such a list?
I figured I would just have a column called prior_partners and be able to maintain a comma-separated list therein for each user. Is that a possible solution? Is it a good solution?
Thanks.
I have a users table, and each user has a unique user_id . Each
Share
You should probably created a partners table that takes the id of both people, and a date. The latest date is the active partnership.
This is a rather basic example. Depending on what exactly a partnership is, you may have other fields.
A history of partners would reflect as a series of rows:
From this we can see that Fizzbuzz had three partnerships in history, and the present partnership is with Sutt Shoes, started on Oct 18, 1995. For every new partnership, you would create a new record.