Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Table Architecture Advice

Status
Not open for further replies.

southbean

Technical User
Jun 3, 2005
147
US

Hello All,

I have a database that tracks development projects. There are essentially two main tables: tbl_projects and tbl_hours. The former lists the project details (project name, number, manager, dates, etc.). The latter lists the development hours for each project (estimated hours, actual hours in Q1, Q2, etc.). There is a one-to-many relationship from the ‘projects’ table to the ‘hours’ table because some projects can span calendar years, e.g., a project could begin in Q4/2005 and end in Q1/2006. In this example, there would be two records in the ‘hours’ table for the single ‘request’ table record.

I’ve been tasked to develop a way that allows users to “bundle” or “group” multiple requests. The idea would be to let a user assign a group ID to those requests the user wanted to group/bundle. For instance, request numbers 1, 2, 3 & 4 could be bundled with group ID ‘G01’.

The end goal of this is reporting. Managers want to see only the sum of the hours for the four requests in group ID ‘G01’.

My question is this: Should I add a ‘group ID’ field to the request table or should I create a new table to manage this?

Any/all help or advice will be truly appreciated!

Thanks,

- Tom
 
If a request may belong to many groups, create a new table.
If a request may belong to at most one group, simply add a ‘group ID’ field to the request table.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top