I've taken over an application that has a SQL backend. There are multiple tables, but the two that I'm concerned about are these:
QAProfile
---------
ProfileID <pk> -int
ProfileName
SecurityGroups -varchar(max)
SecurityGroups
--------------
GroupID <pk> -int
GroupName
My issue is that the the SecurityGroups field is a comma delimited list of GroupID values.
So the Profile table looks like this:
--------------------------------------------
| ProfileID | ProfileName | SecurityGroups |
--------------------------------------------
| 1 | foo | ,1,13,34,56, |
--------------------------------------------
| 2 | bar | ,4,13,29,56, |
--------------------------------------------
A profile can have muliple security groups and a security group can be on muliple profiles
Any suggestions on how to re-engineer this?