•
•
•
•
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
![]() |
•
•
Join Date: Nov 2007
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
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
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
•
•
Join Date: Sep 2006
Location: Nanaimo BC Canada
Posts: 3
Reputation:
Rep Power: 0
Solved Threads: 0
•
•
•
•
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
![]() |
•
•
•
•
•
•
•
•
DaniWeb Database Design Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- I am New In MySQL. Problem With MySQL Database Plz Help. (MySQL)
- Design Solution (Database Design)
- Real Estate Properties Databse (Database Design)
- Inventory Control Database Design (Costing Methods) (Database Design)
- Problem connecting to the database after changing the database server (ASP.NET)
- Database design - subtypes and instances of an entity (Database Design)
- Database Design Advice (MySQL)
Other Threads in the Database Design Forum
- Previous Thread: ERD for incident management system
- Next Thread: Storing web content, best method


Linear Mode