简体   繁体   中英

How to map ER Diagram of user asking questions and answering scenario?

How to draw the ER diagram of below mentioned scenario?

Scenario: Users can asks questions according to subjects they have enrolled, and as well as answer to those questions. So basically Users can ask questions belongs to subjects and Users can answer to those asked questions.

In my diagram I have 3 entities, those are User and Question , and Subject . And Answer will be a derived attribute of the relationship between User and Question entities. And Question belong to a Subject .

My question is can Question be introduced as an Entity to the ER diagram or not?

When thinking about the definition of the Entity, I feel Question cannot be introduced as an Entity to the ER diagram.

If then, how Question can be introduced to the ER Diagram?

I don't know how you structured your database. You can use loop in this case. Group of users are the one who asks as well as answers question. It is am:n relationship. You can add subject as descriptive attribute. It is hard to answer without knowing the entire database structure. I hope it can give you some ideas. ER图

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM