Normalsing a Table set

  • Having both clientID and taskID in the hours worked table is fine if the there isn't something that says each task is applicable to only one client. If there is such a rule though it breaks third normal form, so is not something you want to do (you would have the taskID in the hours worked table, but not the clientID; and you would have the clientID in the task table, as a foreign key pointing to the client table).

    I can't though imagine a situation in which you would want taskID in the client table, or business rules that would allow the to be in 3NF or higher if you did that.

    edit: I've just realised that you have a completely different concept of task from that suggested by sturner, so the above doesn't apply. You should throw away that idea of task altogether, and add the extra client ID that sturner suggested - what you need to avoid using a NULL lientID in the hoursworked table is a special clientID that represents your own organisation as a client of itself. Suppose you are "company A" and you provide services to "company B" and "company C" - then your clients are "company A", "company B", and "company C" not just "company B" and "company C". So work which is part of your internal operation (as opposed to work for an external client) is shown in the hours worked table as work for your internal client (so you record any use of time which you pay for but don't bill to an external client in the hours worked table as work for teh client "company A", and this includes paid vacation time, paid sick leave, training, and so on as well as administrative stuff, marketting, accounting, and so on).

    Tom

Viewing post 16 (of 15 total)

You must be logged in to reply to this topic. Login to reply