Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 3 of 3 total |
Need opions on 'linking' table records |
Thu, May 15 2008 4:41 AM | Permanent Link |
Pat | Hi,
I would like to get design opions on this. I have a Job Costs module (in my application) setup as a Master-Detail (Master table is the Job Numbers and the Detail table is the transactions relating to each Job). It is all working fine. What I want to do now is somehow 'link' the Job Numbers. So say I have 5 jobs: Job1 Job2 Job3 Job4 Job5 Presently when I do a Job Transaction Report (with Report Builder) I get a list of the 5 jobs - no problem. I now wish to 'link' jobs Job1, Job3 and Job5 with Job1 as the 'main job'. So when I do my new Job Transaction LINK Report, the selection criteria will be Job1 and then I get a report ONLY showing Job1, Job3 and Job5. My initial thought was to have a grid on the Job Form (the grid is connected to a table that holds this 'link' information). So, when you want to 'link' a job to the 'main job', you open the Job Form to say Job1 and in the grid just add Job3 and Job5. Then I thought, do not worry about this grid setup, just store the link to the 'main job' on each of the link jobs (so job Job3 has a field to say it is linked to Job1 and Job5 has a field to say it is linked to Job1). Which setup do you think is the way to go? Is there a better way? Thanks for any ideas. Regards, Pat |
Thu, May 15 2008 1:03 PM | Permanent Link |
Fernando Dias Team Elevate | Pat,
If the relation is 1:n (each job can have zero or more child jobs and each child job can have only one parent job) then you should simply add a column "ParentJob" in the jobs table. If, on the contrary the relation is m:n (each job can have zero or more child jobs AND each child job can have more than one parent job) then you must have a second table (ParentJob, ChildJob). -- Fernando Dias [Team Elevate] |
Fri, May 16 2008 6:03 PM | Permanent Link |
Pat | Hi Fernando,
>If the relation is 1:n (each job can have zero or more child jobs and >each child job can have only one parent job) then you should simply add >a column "ParentJob" in the jobs table. >If, on the contrary the relation is m:n (each job can have zero or more >child jobs AND each child job can have more than one parent job) then >you must have a second table (ParentJob, ChildJob). Thanks for the detailed explanation Much appreciated. Pat |
This web page was last updated on Friday, March 29, 2024 at 03:30 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |