ORM Compound Reference Scheme Problem

From: Chris Bruce <chris_at_mirrorcomputing_no_spam.co.uk>
Date: Fri, 7 Jun 2002 12:37:40 +0100
Message-ID: <adq61d$54o$1_at_taliesin2.netcom.net.uk>



Hi All,

I have a problem recording a compound reference scheme for an object that requires two instances of the same fact to derive the reference.

For example, I want to record the OS Grid Reference for a Location and wish to show/record both the component Easting and Northing values for the grid ref.

Reference Schemes:
Location(Id); OSGridRef(defined by OffsetValue of OffsetType("Easting"), defined by OffsetValue of OffsetType("Northing"))

Fact Types:
Location is at OSGridRef
OSGridRef is defined by OffsetValue of OffsetType

Constraints:
Internal uniqueness constraint over all roles of "OSGridRef is defined by OffsetValue of OffsetType"
Each Location has exactly one OSGridRef

Sample Population:

OS Reference     Offset Value     Offset Type

(219,729) 219 Easting
(219,729) 729 Northing
(219,728) 219 Easting
(219,728) 728 Northing

In order to get the compound reference for OSGridRef I need to get the OffsetValue for OffsetType "Easting" and the OffsetValue for OffsetType "Northing".

How do I show this on the conceptual schema?

I guess that the easy way out for the compound reference scheme is to say OSGridRef is defined by NorthingValue
OSGridRef is defined by EastingValue
with an external primary constraint on the pair of roles - but this goes against the grain!

Ideas? Comments?

Many TIA...

--
CB
Received on Fri Jun 07 2002 - 13:37:40 CEST

Original text of this message