Home > database >  Ask the old man a data table design problem
Ask the old man a data table design problem

Time:09-28

I now have an information table, there are a lot of information, different users can focus on these information, this attention information could be grouped again at the same time, how to design, want to want to also didn't think very good, old elder brothers do you have any ideas,

CodePudding user response:

Bumps========

CodePudding user response:

Table 1: the user ID, ID information
Table 2: information table (see the specific situation and then to you)
Table 3: the user table

CodePudding user response:

Simple solution:
1, the information table primary key msg_id
2, the user table primary key user_id
3, the users table primary key guid; Msg_id... User_id
4, the user information grouped table primary key guid; User_id, msg_type information types; Msg_id information number;
Usage:
User attention to 3 users table to add a record, the match msg_id and user_id.
User groups, the information is added in the user information grouped table 4 a record, the record information types corresponding user_id msg_id
  • Related