This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
When booking a contractor, should the customer book all workers working for particular sub-contractor?
Per previous discussion, DB schema suggests this to be true since only one customer ID can be associated with any subcontractor and we cannot change DB schema.
However, the requirement also says that CSR will offer one or more contractors (i.e., workers) to the customer. This suggests that customer may request only some of the workers, while the remaining workers available for another customer.
Any thoughts on how to interpret this?
Joined: Sep 02, 2003
I thought it over, it won't be a good solution if a customer has to pay for all workers when he only wants one of them.
What I could do is when customer requests some of the workers, I create another record, which is a clone from the existing subcontractor record, then,
1) the new record has the numbere of workers working for the customer and customer ID. 2) that number will then be deducted from the original record. 3) the new record is added and the original record is updated.
Since there is no requirement that subcontractor's name + location has to be unique, that should work.
According to the assignment, you can only assign one customer id to a contractor. Therefore, it does not matter how many workers there are working for a contractor. At least that's how I plan on coding my project.
Hi Yan, I just joined Java Ranch. Before I saw your interpertation of booking a certain # of contractors from a Contractor company, I was going to implement it in the same way. It's good to know that someone else is thinking the same way I am. So did you decide to stick to this approach? There are others on this message board who think one customer ID per subcontractor, but that does not make any bussiness sense to me.