简体   繁体   中英

Join table of foreign keys

I have two tables, groups and users and I am trying to do things like:

  1. Is a user pending their membership (if a group has a private setting and the user must be verified first)

  2. When did the user join the group

etc.

For this reason, I am wondering if it is considered a valid choice to make a new table, something like groups_users which has a primary key that I completely ignore, but it has foreign keys user_id and group_id , and then fields like is_admin , is_pending , joined_on , etc.

Or, is there another way to do this that does not involve making such a table?

Just looking this solutions...i am implementation of this schema of few projects

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM