I'm happy with the names. These relations have so far often been named by the tables they are joining (BranchJob, ArchiveJob) as with the job_type column, they can be used for several different types of task. Although we are not consistent - ApportJob should be BlobJob for instance.
We want a unique database user per script. If you have one script processing multiple types of jobs, that is one database user.
We will need some indexes in case these tables grow:
CREATE INDEX PersonTransferJob__minor_person__idx ON PersonTransferJob(minor_person);
CREATE INDEX PersonTransferJob__major_person__idx ON PersonTransferJob(major_person);
CREATE INDEX QuestionJob__question__idx ON QuestionJob(question);
I'm happy with the names. These relations have so far often been named by the tables they are joining (BranchJob, ArchiveJob) as with the job_type column, they can be used for several different types of task. Although we are not consistent - ApportJob should be BlobJob for instance.
We want a unique database user per script. If you have one script processing multiple types of jobs, that is one database user.
We will need some indexes in case these tables grow:
CREATE INDEX PersonTransferJ ob__minor_ person_ _idx ON PersonTransferJ ob(minor_ person) ; ob__major_ person_ _idx ON PersonTransferJ ob(major_ person) ; _question_ _idx ON QuestionJob( question) ;
CREATE INDEX PersonTransferJ
CREATE INDEX QuestionJob_