Re: ParadoxField?



In the Relationships table, also create another secondary index on RelativeID, then you can do a reverse search. This gets a little more complicated.

Add an extra 2 options to RelativeType -5 = Son, 6=Daughter

Tom Krieg wrote:
Ah! recursion. If it's only to one level, then it's easy.

Persons
Field1 PersonID (Meaningless Identifier)
Field2 Name
Field3 Birthday
Field4 Address
Primary Key = PersonID

Relationships
Field1 RecordID (Meaningless Identifier)
Field1 PersonID - points to Persons record of this person
Field2 RelativeType - 1 = Father; 2 = Mother, 3 = Brother, 4 = Sister
Field2 RelativeID - points to PersonID of relative
Primary Key = RecordID
Secondary Index on PersonID + RelativeType + RelativeID (Unique)


--
Tom Krieg

---------------
http://www.krieg.com.au
Please use the contact page to contact me via email
.



Relevant Pages

  • Re: ParadoxField?
    ... Field1 RecordID ... Field2 PersonID - points to Persons record of this person ... Secondary Index on PersonID + RelativeType + RelativeID (Unique) ... You wouldn't necessarily use this in your logic but Paradox requires a unique primary key to have secondary indexes. ...
    (comp.databases.paradox)
  • Re: ParadoxField?
    ... Field1 PersonID ... Primary Key = PersonID ... Secondary Index on PersonID + RelativeType + RelativeID (Unique) ...
    (comp.databases.paradox)
  • Re: ParadoxField?
    ... RelativeID, then you can do a reverse search. ... Field1 PersonID ... Field1 RecordID ...
    (comp.databases.paradox)