Table links (Table Relations)
I have a question for someone he might seem stupid, but I still can't figure out how to connect.
I have two tables of User and Rule. The table Rule retains access rights for a particular user, and the 1st user may have only one right, but the table of rights may have many users.
I think it's one-to-one connection, do I think it's right to describe in detail what's going on?
Thank you very much.
You make one little mistake in your mind. The possible number of user rights should not be taken into account. Let the registered user have the right to create a subject, answer questions, comment on other users. But someone suggested that he become a moderator, and the integrity of the data could be compromised immediately, as his previous rights had not disappeared and new ones added. So we need a table with a id_user structure, id_rule. A new rule is added, and a new record is being created with the meaning of id_user, but another id_rule. If this is not foreseen, problems will begin.