我正在尝试设计一个数据模型,涉及组中的用户,并发布到组,并且帖子有评论。
我该如何准备好将其配置到数据表中?我是否使用了正确的数据类型,并正确地实现了关系?如果没有请给建议。
User Class
objectID [String]| userName [String]| password [String] | groupsUserBelongsTo [Array of numbers]| emailAddress [String]
Group Class
objectId [Int]| groupName [String] | UserIDsOfGroupMembers (one to many relation to userID.user)| PostsOfGroups (one to many relation to objectId.post)
Post Class
objectId [String]| Timestamp [String] | postSubject [String]| postBody [String]| groupsPostBelongsTo [Array]| postAuthor [String] | commentsOfGroups (one to many relation to objectId.comment)
Comment Class
objectId [String]| Timestamp [String] | commentBody[String]| postCommentsBelongsTo [Array] | commentAuthor [String]
我真的觉得我可以添加更多关系,但我想不出任何关系,而且我没有使用正确的关系类型(多对多、一对一等)。