Results 1 to 5 of 5

Thread: Design Help

  1. #1
    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!

  2. #2
    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!

  3. #3
    Join Date
    Sep 2004
    Posts
    2
    What would be a recommended, or more standard, naming scheme for that table?

  4. #4
    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.!

  5. #5
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •