Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Table structure?

Author  Topic 

MikeB
Constraint Violating Yak Guru

387 Posts

Posted - 2006-06-08 : 16:32:49
I need to come up the a table structure to accomodate time tracking, hours worked.

I must track the following:
employee, activity, project, product, product_qty, hours

Special considerations:
  • an employee can work on an activity
    that is not related to a project. In this
    situation, the project, product, and product_qty is
    not required. E.g.: Department Meeting

  • an activity, such as a meeting, can be project specific,
    in this case a project must be specified.

  • an activity, such as detailing, is project and product
    specific. Therfore a project and product must be specified.

  • There 3 types of quantities that can be entered for a product, one is number of erection drawings, one is quantity of product, and finally, number of fabrication drawings. These are of
    course dependent on the activity. E.g: Detailing/Revising/Prepare for Fabrication(Actvities) for hollowcore product, the quantity must
    be the total square feet of the project. Detailing and revising structural type products, the total must be number of erection drawings and when preparing for fabrication, the quantity must be the number of fabrication drawings.

  • When the user selects a project. The application must list all
    products for that project. If a desired product is not listed, the user must have a means of adding it.

  • The quantities for the product/activity association must be
    a running total to be entered by the user.




Now, this I have banged my head on and have come up with a few feable attempts that do not work.

If anyone can make a suggestion or two to help me get started, it would be greatly appreciated.

Thanks
Mike B
   

- Advertisement -