数据库的菜鸟,正在寻找一些建议/指针来帮助我入门。
我需要创建一个数据库来保存一些用户的详细信息以及他们必须每周完成的任务列表。然后,此数据将用于显示用户表以及作业的每周完成状态。该表也应该能够显示我前几周的状态。
作业列表必须允许添加新作业和删除旧作业。
我目前有以下表格:
-----
User
-----
ID
Name
Email
A number of users will be entered into this table.
----
Job
----
ID
Name
Description
A list of jobs (starting at 4) which each user has to mark as completed each week, this list must be able to grow.
---------
WorkDone
---------
ID
User_ID
Job_ID
Timestamp
Used to record when a user has marked a job as complete.
我的桌子结构还好吗,还是我从错误的角度来看这个?我需要编写一个允许我返回的查询:
User.ID (1) | Job 1 completed status | Job 2 completed status | Job (n) completed status
User.ID (2) | Job 1 completed status | Job 2 completed status | Job (n) completed status
User.ID (n) | Job 1 completed status | Job 2 completed status | Job (n) completed status
我在这里没有运气,我只是在寻找那个“doh”当然的时刻。
任何帮助表示赞赏。