0

我有一个职位表,例如:

`job_post`
  - name
  - position

`job_application`
  - profile (FK)
  - job_post (FK)  

换句话说,有人发布了一份工作,job_post然后人们可以申请该工作,job_application

我想增加一个将工作授予个人的能力。例如,如果用户 1-10 申请了 Plumber 的职位,则该职位可以授予用户 6。

我应该在哪里添加授予项目的概念?我不想为这么小的东西添加一个额外的表。哪个更可取——

选项 1 - 开启job_post

`job_post`
  - name
  - position
  - awarded_to (FK to profile, else Null if hasn't been awarded yet)

选项 2 - 开启job_application

`job_application`
  - profile (FK)
  - job_post (FK)  
  - awarded (boolean field, default = 0, if awarded = 1)

此外,将此列添加到上述表格之一是否是非规范化 db 结构的示例?如果是这样,为什么?

4

1 回答 1

0

Job_post is going to be awarded to a Job_application, that's the concept i can read. Then, with that logic, if only one application can be awarded to only one job, the first option is feasible. If more than one applicant can be awarded with the job post, then the second option is the correct one.

于 2012-05-26T19:22:30.217 回答