Need some help with ideas for my database design.
The database tracks various projects that our company monitors. Each project will have a case that its related to, typically there is only one project per case - but sometimes there can be multiple projects per case. As information comes in - we also have more information about the project than we do the case because the project is assigned to us first and then we either find or create the case. This means that we may have a project in the system for a while that does not have a case. Each project is then bid on by our various bidders. We have a large selection of people that will bid on many of our projects. And since they're bidding - sometimes they place more than one bid.
So - at first I have my tblCase, tblProject, tblBidder, and tblBids to track everything. tblCase has a caseID, tblProject has a projectID, tblBidder has a bidderID, and tblBids has a bidID. And I have set up a relationship of:
tblCase.caseId 1-to-many tblProject.caseID
tblProject.projectID 1-to-many tblBids.projectID
tblBids.bidderID many-to-1 tblBidder.bidderID
to link it all. And it seems to do exactly what I want. But I have bit more information that I'm not sure what to do with. See - tblBids contains date,amount,bidID, and projectID. If a new bid is placed - I know when, by who, and for what. The new information I want to keep track of is in the case of each project - has the bidder been to the property and has the bidder done a full inspection of the property. I could add that as fields to tblBids - but then each bid for a given projectID would have to match on those two fields. I could add those fields to the bidder table - but how do I keep track of each project they've inspected. Likewise with the project table - how do I track which bidders in a single field? I hope I explained this properly.
I'm guessing I'll have to create a new table to track this simple data. But how would I properly link it so that in viewing that table you could easily see that "johndoe" has inspected "project b"?
Any help that anyone can provide would be wonderful!
The database tracks various projects that our company monitors. Each project will have a case that its related to, typically there is only one project per case - but sometimes there can be multiple projects per case. As information comes in - we also have more information about the project than we do the case because the project is assigned to us first and then we either find or create the case. This means that we may have a project in the system for a while that does not have a case. Each project is then bid on by our various bidders. We have a large selection of people that will bid on many of our projects. And since they're bidding - sometimes they place more than one bid.
So - at first I have my tblCase, tblProject, tblBidder, and tblBids to track everything. tblCase has a caseID, tblProject has a projectID, tblBidder has a bidderID, and tblBids has a bidID. And I have set up a relationship of:
tblCase.caseId 1-to-many tblProject.caseID
tblProject.projectID 1-to-many tblBids.projectID
tblBids.bidderID many-to-1 tblBidder.bidderID
to link it all. And it seems to do exactly what I want. But I have bit more information that I'm not sure what to do with. See - tblBids contains date,amount,bidID, and projectID. If a new bid is placed - I know when, by who, and for what. The new information I want to keep track of is in the case of each project - has the bidder been to the property and has the bidder done a full inspection of the property. I could add that as fields to tblBids - but then each bid for a given projectID would have to match on those two fields. I could add those fields to the bidder table - but how do I keep track of each project they've inspected. Likewise with the project table - how do I track which bidders in a single field? I hope I explained this properly.
I'm guessing I'll have to create a new table to track this simple data. But how would I properly link it so that in viewing that table you could easily see that "johndoe" has inspected "project b"?
Any help that anyone can provide would be wonderful!