实体关系图

发布于 2024-10-20 06:08:14 字数 510 浏览 6 评论 0原文

我正在尝试为我的应用程序创建一个实体关系模型。

该应用程序在测验中包含问题和答案。

到目前为止,我生成的模型如下所示:

在此处输入图像描述

我对这些图表很陌生,所以会如果有人能解释如何用箭头和多重性来完成它,我将不胜感激。

Quiz 表在 QUIZ_TEXT 中保存问题,在 CORRECT_ANSWER 中保存正确答案。

Answer 表在 ANSWERS 中保存答案,并将这些答案与问题 QUIZ_ID 进行匹配。

我知道这可能很简单,但我已经很长时间没有使用数据库了,我的大脑一片空白。另外,我需要做的就是这样我就可以继续前进,并且我的大部分工作不是在数据库上。请帮忙。谢谢

编辑:

我已经尝试这样做,请告诉我这是否正确。谢谢: 在此处输入图像描述

I am trying to create an entity relationship model for my application.

The application has questions and answers within a quiz.

The model which I have produced so far looks like this:

enter image description here

I am quite new to these diagrams, so would appreciate if someone could explain how to complete it with an arrow and multiplicity.

The Quiz table holds questions in QUIZ_TEXT and the correct answer in CORRECT_ANSWER

The Answer table holds the answers in ANSWERS and matches these answers with the QUIZ_ID which is the question.

I understand this is probably simple but I haven't worked with databases for a long time and my mind is going blank. Also all I need to do is this then I can move on and the majority of my work is not on databases. Please help. Thanks

Edit:

I have tried to do this, please let me know if this is correct. Thanks:
enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

许一世地老天荒 2024-10-27 06:08:14

测验和答案之间的关系是一对多,因此您应该在测验和答案之间画一条线,并在答案末端画一条鱼尾纹。还有其他表示法,但这是最常见的方式之一。

The relationship between Quiz and Answer is one-to-many so you should draw line from Quiz to Answer and put a crow's foot in the Answer end. There are other notations but this is one of the most common ways.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文