can I have overlapping primary keys? (mysql)
I have this DB where I have two entities that has to be managed by a user.
The user can manage either one of the two entities or both.
So here is the structure:
the problem:
If a
user has access to both A and B. he also can accidentally have access to one of them and the table would have partial duplication.
solutions in mind:
- I could only add privilege to only one of them entities at a time.
- I could have two privileges tables. one for A and another for B
I thought there should be some way to have an overlapped primary keys or something similar.
my real question: Is there any other way to do this other than my simple solution?0 Replies