Firstly sorry for the slightly confusing title, was a bit stuck on how to summarise in one scentance.
Basically I was hoping someone could advise me on the best structure to use for part of the database.
The area working on is this.
There are several projects, each project can be in anyone of 9 statuses and each of these statuses has a series of tasks related to it that must be completed before the status of the project can be advanced.
I am assuming that the user would specify which tasks had been completed by the use of checkboxes or the like and then the database would check which tasks had been completed and if some tasks for a particular staus are not complete not allow the user to change the status up.
I'm really confused as to the best database structure. Currently I have:
Table: Status Details:
This is a very small table with two fields
Status_ID
Status
Table: Task Details
this table lists all the tasks and their related statuses
Task_ID
Status (Linked to Status_ID)
Task Description
Compulsary ((Yes/No) not sure yet if this field in necessary or if all will be compulsary but figured best to start off with the more complex scenario and then more to the simpler one if necessary rather than visa) versa
Table: Main Project Table
This will be the main table containing the project data. Will have a Status Field and possibly a "Next task to be completed" field among others.
And this is where I get stuck. I need somehow to link the Task_ID to the projects. I am thinking that I obviously need another table to do this. Would it be best to have this table have a field for project ID and then fields for each individual task each being a yes/no field and then use some code hidden behind whatever forms/queries I use to get the information in a presentable for to the user to determine what the highest status a project can have is. Another option is to change to format of the table I have and have a "Required Tasks" column in the status table that lists the task ID of all tasks required for that status and then use this as a starting point.
Sorry this is really long winded. I hope it makes some sence. Any inputs would be appreciate
Basically I was hoping someone could advise me on the best structure to use for part of the database.
The area working on is this.
There are several projects, each project can be in anyone of 9 statuses and each of these statuses has a series of tasks related to it that must be completed before the status of the project can be advanced.
I am assuming that the user would specify which tasks had been completed by the use of checkboxes or the like and then the database would check which tasks had been completed and if some tasks for a particular staus are not complete not allow the user to change the status up.
I'm really confused as to the best database structure. Currently I have:
Table: Status Details:
This is a very small table with two fields
Status_ID
Status
Table: Task Details
this table lists all the tasks and their related statuses
Task_ID
Status (Linked to Status_ID)
Task Description
Compulsary ((Yes/No) not sure yet if this field in necessary or if all will be compulsary but figured best to start off with the more complex scenario and then more to the simpler one if necessary rather than visa) versa
Table: Main Project Table
This will be the main table containing the project data. Will have a Status Field and possibly a "Next task to be completed" field among others.
And this is where I get stuck. I need somehow to link the Task_ID to the projects. I am thinking that I obviously need another table to do this. Would it be best to have this table have a field for project ID and then fields for each individual task each being a yes/no field and then use some code hidden behind whatever forms/queries I use to get the information in a presentable for to the user to determine what the highest status a project can have is. Another option is to change to format of the table I have and have a "Required Tasks" column in the status table that lists the task ID of all tasks required for that status and then use this as a starting point.
Sorry this is really long winded. I hope it makes some sence. Any inputs would be appreciate