dbTalk Databases Forums  

Multiple relations ship problem.

comp.databases.filemaker comp.databases.filemaker


Discuss Multiple relations ship problem. in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Guy
 
Posts: n/a

Default Multiple relations ship problem. - 07-11-2007 , 05:09 PM






8.5ADV WinXP

I have a table, HOURS
Field_Vehicle_ID
Field_Date
Field_Hours

I have a table FUEL
Field_Vehicle_ID
Field_Hours
Field_Description

I have a table PURCHASES (parts, add-ons)
Field_Vehicle_ID
Field_Hours
Field_Description

I have a table MAINTENANCE (oil changes, etc.)
Field_Vehicle_ID
Field_Hours
Field_Description

I want to enter the HOURS in one of the 3 tables.
Field_Hours_ID
Field_Hours
Field_Description

I can get any pair OK, but when I add a relationship to HOURS, it won't
create a new record.

HELP appreciated.

--
-------------------------------------------------
Captain Guy
s/v Island Time (Beneteau 352#277)
AICW 845.5
386-689-5088



Reply With Quote
  #2  
Old   
Chris Brown
 
Posts: n/a

Default Re: Multiple relations ship problem. - 07-11-2007 , 08:10 PM






Guy wrote:
Quote:
8.5ADV WinXP

I have a table, HOURS
Field_Vehicle_ID
Field_Date
Field_Hours

I have a table FUEL
Field_Vehicle_ID
Field_Hours
Field_Description

I have a table PURCHASES (parts, add-ons)
Field_Vehicle_ID
Field_Hours
Field_Description

I have a table MAINTENANCE (oil changes, etc.)
Field_Vehicle_ID
Field_Hours
Field_Description

I want to enter the HOURS in one of the 3 tables.
Field_Hours_ID
Field_Hours
Field_Description

I can get any pair OK, but when I add a relationship to HOURS, it won't
create a new record.

HELP appreciated.


indexed the hours field? All hours field the same type?

regards

Chris


Reply With Quote
  #3  
Old   
Guy
 
Posts: n/a

Default Re: Multiple relations ship problem. - 07-12-2007 , 07:46 AM



yes


"Chris Brown" <cbrown (AT) medicine (DOT) adelaide.edu.au> wrote

Quote:
Guy wrote:
8.5ADV WinXP

I have a table, HOURS
Field_Vehicle_ID
Field_Date
Field_Hours

I have a table FUEL
Field_Vehicle_ID
Field_Hours
Field_Description

I have a table PURCHASES (parts, add-ons)
Field_Vehicle_ID
Field_Hours
Field_Description

I have a table MAINTENANCE (oil changes, etc.)
Field_Vehicle_ID
Field_Hours
Field_Description

I want to enter the HOURS in one of the 3 tables.
Field_Hours_ID
Field_Hours
Field_Description

I can get any pair OK, but when I add a relationship to HOURS, it won't
create a new record.

HELP appreciated.



indexed the hours field? All hours field the same type?

regards

Chris



Reply With Quote
  #4  
Old   
Chris Brown
 
Posts: n/a

Default Re: Multiple relations ship problem. - 07-12-2007 , 07:00 PM



Guy wrote:
Quote:
yes


"Chris Brown" <cbrown (AT) medicine (DOT) adelaide.edu.au> wrote in message
news:f73v2h$no5$1 (AT) aioe (DOT) org...
Guy wrote:
8.5ADV WinXP

I have a table, HOURS
Field_Vehicle_ID
Field_Date
Field_Hours

I have a table FUEL
Field_Vehicle_ID
Field_Hours
Field_Description

I have a table PURCHASES (parts, add-ons)
Field_Vehicle_ID
Field_Hours
Field_Description

I have a table MAINTENANCE (oil changes, etc.)
Field_Vehicle_ID
Field_Hours
Field_Description

I want to enter the HOURS in one of the 3 tables.
Field_Hours_ID
Field_Hours
Field_Description

I can get any pair OK, but when I add a relationship to HOURS, it won't
create a new record.

HELP appreciated.


indexed the hours field? All hours field the same type?

regards

Chris



ok, when I sent up a acrr 'TOG chain' (A::B::C:::E...) for the
prurposes of creating a new record in the terminal TOC, to force a new
record in each of the intermediate TOCs, I make the rel defs accr for
each direction. This sounds like your situation, which you have working,
unless you add the extra Hours field to each of the rels.


I would expect the rels to be VehicleID::VehicleID and Date:ate
initially; then add hours::Hours.

The Hours field in all 3 tables is just a time field, without auto
enter creation time...?

Not sure what this bit means:


Quote:
I want to enter the HOURS in one of the 3 tables.
Field_Hours_ID
Field_Hours
Field_Description

Why not use the Hours_ID field in all the tables, and in the rels?


regards

Chris


Reply With Quote
  #5  
Old   
Guy
 
Posts: n/a

Default Re: Multiple relations ship problem. - 07-16-2007 , 08:40 AM




"Chris Brown" <cbrown (AT) medicine (DOT) adelaide.edu.au> wrote

Quote:
Guy wrote:
yes


"Chris Brown" <cbrown (AT) medicine (DOT) adelaide.edu.au> wrote in message
news:f73v2h$no5$1 (AT) aioe (DOT) org...
Guy wrote:
8.5ADV WinXP

I have a table, HOURS
Field_Vehicle_ID
Field_Date
Field_Hours

I have a table FUEL
Field_Vehicle_ID
Field_Hours
Field_Description

I have a table PURCHASES (parts, add-ons)
Field_Vehicle_ID
Field_Hours
Field_Description

I have a table MAINTENANCE (oil changes, etc.)
Field_Vehicle_ID
Field_Hours
Field_Description

I want to enter the HOURS in one of the 3 tables.
Field_Hours_ID
Field_Hours
Field_Description

I can get any pair OK, but when I add a relationship to HOURS, it won't
create a new record.

HELP appreciated.


indexed the hours field? All hours field the same type?

regards

Chris




ok, when I sent up a acrr 'TOG chain' (A::B::C:::E...) for the prurposes
of creating a new record in the terminal TOC, to force a new record in
each of the intermediate TOCs, I make the rel defs accr for each
direction. This sounds like your situation, which you have working, unless
you add the extra Hours field to each of the rels.


I would expect the rels to be VehicleID::VehicleID and Date:ate
initially; then add hours::Hours.

The Hours field in all 3 tables is just a time field, without auto enter
creation time...?

Not sure what this bit means:


I want to enter the HOURS in one of the 3 tables.
Field_Hours_ID
Field_Hours
Field_Description


Why not use the Hours_ID field in all the tables, and in the rels?


regards

Chris
Sorry I did not state the business case which migh make the question more
clear.

The Vehicles have a meter which shows the cumulative hours run. (many
vehicles idle for days and the hours rack up while the miles travelled
reamain constant. and boats also use hours only to track usage).

Fuel is tracked by the hour as is maintenance and parts. Maintenance is
scheduled on hourly (like every 100 hours, we change air filters and record
the actual hour (maybe 102) then next due is 202)

At the end of the say, I'd like a report that shows:
Vehicle--------- Date----------- Type ------------- Hours (Cumulative and
since last entry of same type)
#1 --------------- 7/7/07 -------- Fuel ------------- 125 8 (from
earlier)
#1 ----------------7/8/07 --------Fuel -------------- 135 10
#1 --------------- 7/8/07 -------- Filter --------------136 100
#1 ----------------7/9/07-------- Fuel ----------------150 15
#1-----------------7/10/07------- Belts ------------- 160
---
#1 ---------------- 7/14/07 ------- Oil change ------- 200 100

Thanks,

Guy




Reply With Quote
  #6  
Old   
Chris Brown
 
Posts: n/a

Default Re: Multiple relations ship problem. - 07-16-2007 , 05:49 PM



Guy wrote:
Quote:
"Chris Brown" <cbrown (AT) medicine (DOT) adelaide.edu.au> wrote in message
news:f76fb0$bk8$1 (AT) aioe (DOT) org...
Guy wrote:
yes


"Chris Brown" <cbrown (AT) medicine (DOT) adelaide.edu.au> wrote in message
news:f73v2h$no5$1 (AT) aioe (DOT) org...
Guy wrote:
8.5ADV WinXP

I have a table, HOURS
Field_Vehicle_ID
Field_Date
Field_Hours

I have a table FUEL
Field_Vehicle_ID
Field_Hours
Field_Description

I have a table PURCHASES (parts, add-ons)
Field_Vehicle_ID
Field_Hours
Field_Description

I have a table MAINTENANCE (oil changes, etc.)
Field_Vehicle_ID
Field_Hours
Field_Description

I want to enter the HOURS in one of the 3 tables.
Field_Hours_ID
Field_Hours
Field_Description

I can get any pair OK, but when I add a relationship to HOURS, it won't
create a new record.

HELP appreciated.

indexed the hours field? All hours field the same type?

regards

Chris


ok, when I sent up a acrr 'TOG chain' (A::B::C:::E...) for the prurposes
of creating a new record in the terminal TOC, to force a new record in
each of the intermediate TOCs, I make the rel defs accr for each
direction. This sounds like your situation, which you have working, unless
you add the extra Hours field to each of the rels.


I would expect the rels to be VehicleID::VehicleID and Date:ate
initially; then add hours::Hours.

The Hours field in all 3 tables is just a time field, without auto enter
creation time...?

Not sure what this bit means:


I want to enter the HOURS in one of the 3 tables.
Field_Hours_ID
Field_Hours
Field_Description

Why not use the Hours_ID field in all the tables, and in the rels?


regards

Chris

Sorry I did not state the business case which migh make the question more
clear.

The Vehicles have a meter which shows the cumulative hours run. (many
vehicles idle for days and the hours rack up while the miles travelled
reamain constant. and boats also use hours only to track usage).

Fuel is tracked by the hour as is maintenance and parts. Maintenance is
scheduled on hourly (like every 100 hours, we change air filters and record
the actual hour (maybe 102) then next due is 202)

At the end of the say, I'd like a report that shows:
Vehicle--------- Date----------- Type ------------- Hours (Cumulative and
since last entry of same type)
#1 --------------- 7/7/07 -------- Fuel ------------- 125 8 (from
earlier)
#1 ----------------7/8/07 --------Fuel -------------- 135 10
#1 --------------- 7/8/07 -------- Filter --------------136 100
#1 ----------------7/9/07-------- Fuel ----------------150 15
#1-----------------7/10/07------- Belts ------------- 160
---
#1 ---------------- 7/14/07 ------- Oil change ------- 200 100

Thanks,

Guy



Hi Guy,

ok, a better idea of what you are doing.

Looking at your initial 4 tables (Hours, Fuel, Purchases, Maintenance),
I assume you also have a table VEHICLES. This is essentially the pivotal
table (avoiding the implications of 'pivot' table).

I would think that your rels should all be Vehicle_ID + Date. The issue
may be how you handle data, and which table you are entering data from.

Quote:
I can get any pair OK, but when I add a relationship to HOURS, it
won't
create a new record.
If we can start with entering a new Hours record from Vehicles table, I
would use a global date, so the rel:

VID::VID and g_Date:ate acrr

As I understand your initial post, you want to be able to create a fuel
record from any of the other tables. First things first.

The report as you have have it outlined, is date sorted, and mixed
fuel/parts/fuel... this is going to be a problem I would suggest at this
stage. Probably a multiple subsummary structure sorted by data and
related type (Fuel/maintenance/Parts...). I am already thinking a
separate Date and Type table may be a good idea.



regards

Chris



Reply With Quote
Reply




Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.