I am currently designing a module where a service or console application will be reading Job from a JobQueue table. I have designed the JobQueue table with the following info in it:
JobId: int Primarykey
JobType: int notnull
State: varchar notnull
CreatedOn: datetime notnull
LastModifiedOn: datetime nullable
CompletedOn: datetime nullable
The JobType attribute is mainly introduced to keep this table more generic, than towards particular type of job. My question is whether to keep the details for the job to be executed in this table itself or some other table with job id referencing it? This is because i have the data available in some other table. So while executing the job we can indirectly fetch the data. To avoid duplicating the info, i thought of something like this. Is this a good approach? Need your advice on this