我必须在我的数据库中添加表格才能存储这样的信息:
user 1
2015:
- 3 times at bowling
- 10 times at cinema
2014:
- 2 times at bowling
- 3 times at the restaurant
- 5 times at cinema
user 2
2015:
- 1 time at the restaurant
- 3 times at the cinema
2014:
- 2 times at bowling
2013:
- 3 times at the restaurant
- 1 time at bowling
user 1
2015:
- 1 time doctor
- 1 time dentist
2014:
- 2 times doctor
user 2
2015:
- 2 times doctor
- 1 time ophthalmologist
年数根据使用者,爱好数量,医生等而有所不同。 用户的全球数据也因一年而异(例如,天数)。
我想到了这个结构:
Global table :
userId - year - nbHolidays -
Hobbies table :
userId - year - activityId - numberOfTimes
medical table :
userId - year - kindDoctorId - numberOfTimes
我对数据库概念没有太多经验,您认为这是一个很好的结构吗?