Hi there, I have a database that has two tables, these tables look like this
codes id | code | member_id 1 | 123 | 2 2 | 234 | 1 3 | 345 | 4 | 456 | 3 members id | code_id | other info 1 | 2 | blabla 2 | 1 | blabla 3 | 4 | blabla
the basic idea is that if a code is taken then its member id field is filled in, however this is creating a circle link (members points to codes, codes points to members) is there a different way of doing this? is this actually a bad thing?
Update
To answer your questions there are three different code tables with approx 3.5 million codes each, each table is searched depending on different criteria, if the member_id column is empty then the code is unclaimed, else, the code is claimed, this is done so that when we are searching the database we do not need to include another table to tell if it it claimed.
the members table contains the claimants for every single code, so all 10.5 million members the additional info has things like mobile, flybuys.
the mobile is how we identify the member, but each entry is considered a different member.