ER用户评级模型 [英] ER Model of User Ratings

查看:311
本文介绍了ER用户评级模型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有很多用户,每个用户最多有5个服务。用户应该能够对每个服务进行评分(0-5)。我还想坚持用户的平均评分。

I have many "Users" and each of them will have maximum of 5 "Services". The User should be able to Rate (0-5) on each Service. I would also like to persist the Avg Rating of the Users.

这就是我的想法,但是有更好的方法吗?

This is what I am thinking, but there could be a better way?

用户

id | user_name | dob | ...

服务(服务的固定数量)

id |service_description | service_code | avg_rating

评分:

id | service_id | user_id | rating (0-5)


推荐答案

我创建了E / R图以描述可以实现多个评级系统的方式。请注意,我在许多事情中都使用了通用名称。

I have created an E/R diagram to depict the way a multiple ratings system can be implemented. Note that I have used generic names for a lot of things.

这篇关于ER用户评级模型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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