If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > Design Help

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-28-04, 14:31
tsorf33 tsorf33 is offline
Registered User
 
Join Date: Sep 2004
Posts: 2
Design Help

I'm trying to put together a database, but I've ran into a problem. It seems to me that this can't be the best solution, so perhaps someone here can help me solve my problem.

Basically, I have these 'Jobs' that spend a certain amount of time in different 'Departments'. I need to know how long the jobs have been in each department. What I have done now, is I have a 'Job' table, 'Department' table, and a 'Stopwatch' table. The 'Job' entry has an attribute 'Current_Dept' which contains the 'Department_ID' of the current dept. Everytime a 'Job' enters a 'Dept', I create a 'Stopwatch' with a 'Start_Time', 'Job_ID', 'Dept_ID', and of course an 'End_Time' when the job moves on. This will eventually create a WHOLE LOT of Stopwatch entries. Is there a simpler way of accomplishing this?

Thanks so much!
Reply With Quote
  #2 (permalink)  
Old 09-29-04, 06:45
andrewst andrewst is offline
Moderator.
 
Join Date: Sep 2002
Location: UK
Posts: 5,171
No, it sounds more or less perfect! If you have a whole lot of job movements to record, then you need to create a whole lot a records!

I'm not particularly keen on the name "Stopwatch" for the table though!
__________________
Tony Andrews
http://tinyurl.com/tonyandrews
Reply With Quote
  #3 (permalink)  
Old 09-29-04, 08:14
tsorf33 tsorf33 is offline
Registered User
 
Join Date: Sep 2004
Posts: 2
What would be a recommended, or more standard, naming scheme for that table?
Reply With Quote
  #4 (permalink)  
Old 09-29-04, 09:12
andrewst andrewst is offline
Moderator.
 
Join Date: Sep 2002
Location: UK
Posts: 5,171
Something like Job_Department_Assignment perhaps. You may be able to think of a better name. It's just that, to me, "Stopwatch" sounds like a table of stopwatches, which might have attributes like Make, Accuracy, Water_resistance, etc.!
__________________
Tony Andrews
http://tinyurl.com/tonyandrews
Reply With Quote
  #5 (permalink)  
Old 10-05-04, 10:22
rajiravi rajiravi is offline
Registered User
 
Join Date: Apr 2004
Location: Toronto, Canada
Posts: 249
Since the "stopwatch" table has the job_id and dept_id along with the effective time frame, hat is the purpose of having the "current_dept_id" in the jobs table?

That information is redundant since it can be inferred from the stopwatch table.

If the current department is needed, maybe a view can be created joining the stopwatch and the jobs tables.


Ravi
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On