改进数据库的关系图 [英] To improve a relation figure for a database

查看:135
本文介绍了改进数据库的关系图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此问题基于我的计划,主题

This question is based on my plan at the thread.

下图显示了我的数据库中的关系

The following figure shows relations in my database

alt text http://files.getdropbox.com/u/175564/relation-figure.png

我有两个帮助表: questions-subjects check-moderator 。我使用前者,因为一个问题可以有许多主题,而后者因为多个主持人可以检查问题。

I have two "help-tables": questions-subjects and check-moderator. I use the former because one question can have many subjects, while the later because more than one moderator can check a question.

表格之间的虚线箭头 moderator-check

The dotted arrow between the tables question and moderator-check indicates that there may be questions which moderators do not check.

这是我的第一个数据库项目,因此表中有错误。

This is my first database-project so there are mistakes in the tables.

您会在表格中改善什么?

推荐答案

,UserInfo,Moderator和Password是多余的表,不提供任何好处。

User, UserInfo, Moderator and Password are redundant tables that offer no benefit.

它们只表示1-1与User的关系,因此没有必要将它们规范化为单独的表:

They only express 1-1 relationships with User, so there is no need to normalize them into seperate tables:

创建一个表格:


  • UserId

  • 名称

  • 电子邮件

  • PasswordMd5

  • IsModerator

  • UserId
  • Name
  • Email
  • PasswordMd5
  • IsModerator

这篇关于改进数据库的关系图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆