.net 好友分组的表是怎么设计的

来源:百度知道 编辑:UC知道 时间:2024/09/24 01:17:21
就是好友的分组表和好友表还有用户表这些是怎么设计的?希望各位大侠帮忙解释一下

好友分组的表:
Create Table FriendGroup
(
isid int, --关键字段
GroupID int, --好友分组编号
FriendID int --用户编号
)

用户表:
Create Table FriendTable
{
isid int, --关键字段
FriendID int,--用户字段
FriendName varchar(50) --用户姓名
....
}

FriendGroup.FriendID=FriendTable.FriendID 建立关联就可以了

自己的一点小看法。

Users表(id,name,sex,...)//用户信息表
Friend表(id,name,...) //好友信息表
Group表(id,Groupname,...)//分组信息表
UserFriend(id,UserId,FriendId,GroupId)//好友信息关联表