User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Database Design section within the Web Development category of DaniWeb, a massive community of 455,968 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,739 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Database Design advertiser: Programming Forums
Views: 921 | Replies: 2
Reply
Join Date: Nov 2007
Posts: 2
Reputation: shanewaj is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
shanewaj shanewaj is offline Offline
Newbie Poster

Help NEED HELP complicated problem with the design of a database

  #1  
Nov 22nd, 2007
I am having a complicated problem with the design of a database.
Lets Describe the problem

This is going to be used in a job tracking system
we will have a list of jobs so
TABLE 1: JOBS (JOBID,DUE DATE, SHIP DATE, INVOICE DATE, STATUS, CATAGORY)

what is category well it tell what sort of job it is actually by that i have say this is a print job so this job should go to retouching department first then to printing then to dispatch
i have jobs that have to move between 8 departments.

So TABLE 2: DEPARTMENT (DEPTID, DEPT NAME, TIME REQUIRED FOR A JOB, NUMBER OF EMPLOYEE)

I have to keep track of all the jobs done by each department so a DEPARTMENT JOB RELATION which is many to many

AS TABLE 3: JOB_DEPT (JOBID,DEPTID)

NOW my problem is how to put category in action ...

as if i draw a table that might look like bellow

CAT1 - DEPT1 - DEPT2 - DEPT3 - DEPT8
CAT2 - DEPT1 - DEPT3 - DEPT5 - DEPT8
CAT3 - DEPT1 - DEPT2 - DEPT3 -DEPT3 - DEPT5- DEPT8
CAT4 - DEPT1 - DEPT2 - DEPT3 -DEPT4 - DEPT5-DEPT6 - DEPT7- DEPT8
CAT4 - DEPT1 - DEPT2 - DEPT4 -DEPT5 - DEPT3-DEPT6 - DEPT7- DEPT8
CAT5 - DEPT1 - DEPT7 - DEPT1 - DEPT2 - DEPT5-DEPT8
CAT6 - DEPT1 - DEPT6 - DEPT7 - DEPT4 - DEPT5-DEPT8

some thing like this.

what should i do ... just a reference table ...

I am also thinking of making the JOB_DEPT relation table in two parts 1 completed 2 uncompleted as by status field in JOBS Table will know where to go.

I am going in the right direction .... please reply .... with ideas and help ...

Thanks
Shanewaj
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Nov 2007
Posts: 2
Reputation: shanewaj is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
shanewaj shanewaj is offline Offline
Newbie Poster

Re: NEED HELP complicated problem with the design of a database

  #2  
Nov 22nd, 2007
Any Reply will be appreciated
Reply With Quote  
Join Date: Sep 2006
Location: Nanaimo BC Canada
Posts: 3
Reputation: billnan is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
billnan billnan is offline Offline
Newbie Poster

Re: NEED HELP complicated problem with the design of a database

  #3  
Dec 8th, 2007
Originally Posted by shanewaj View Post
I am having a complicated problem with the design of a database.
Lets Describe the problem

This is going to be used in a job tracking system
we will have a list of jobs so
TABLE 1: JOBS (JOBID,DUE DATE, SHIP DATE, INVOICE DATE, STATUS, CATAGORY)

what is category well it tell what sort of job it is actually by that i have say this is a print job so this job should go to retouching department first then to printing then to dispatch
i have jobs that have to move between 8 departments.

So TABLE 2: DEPARTMENT (DEPTID, DEPT NAME, TIME REQUIRED FOR A JOB, NUMBER OF EMPLOYEE)

I have to keep track of all the jobs done by each department so a DEPARTMENT JOB RELATION which is many to many

AS TABLE 3: JOB_DEPT (JOBID,DEPTID)

NOW my problem is how to put category in action ...

as if i draw a table that might look like bellow

CAT1 - DEPT1 - DEPT2 - DEPT3 - DEPT8
CAT2 - DEPT1 - DEPT3 - DEPT5 - DEPT8
CAT3 - DEPT1 - DEPT2 - DEPT3 -DEPT3 - DEPT5- DEPT8
CAT4 - DEPT1 - DEPT2 - DEPT3 -DEPT4 - DEPT5-DEPT6 - DEPT7- DEPT8
CAT4 - DEPT1 - DEPT2 - DEPT4 -DEPT5 - DEPT3-DEPT6 - DEPT7- DEPT8
CAT5 - DEPT1 - DEPT7 - DEPT1 - DEPT2 - DEPT5-DEPT8
CAT6 - DEPT1 - DEPT6 - DEPT7 - DEPT4 - DEPT5-DEPT8

some thing like this.

what should i do ... just a reference table ...

I am also thinking of making the JOB_DEPT relation table in two parts 1 completed 2 uncompleted as by status field in JOBS Table will know where to go.

I am going in the right direction .... please reply .... with ideas and help ...

Thanks
Shanewaj


I'd use a category department sequence table. Each entry in this table would be include the category, a sequential number, and the department that had that place in the sequence.

So, your table would have the following entries for category 1

(CAT1 - DEPT1 - DEPT2 - DEPT3 - DEPT8 - I'm assuming this is the sequence)


CAT1, 1, DEPT1
CAT1, 2, DEPT2
CAT1, 3, DEPT3
CAT1, 4, DEPT8

For category 2

CAT2 - DEPT1 - DEPT3 - DEPT5 - DEPT8

CAT2, 1, DEPT1
CAT2, 2, DEPT2
CAT2, 3, DEPT3
CAT2, 4, DEPT8

I hope this is clear.

Bill
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Database Design Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Database Design Forum

All times are GMT -4. The time now is 9:09 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC