Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2004
    Posts
    1

    Unanswered: Multiple-Parents

    Can I have two different parents for the same child table in a dataset. The columns for which the relationships exist are the same:

    For ex:

    TABLE1

    ID DATA

    TABLE2

    ID DATA

    TABLE3

    ID TABLETYPE TABLEID DATA


    When TableTYPE is table1, TABLEID should be assigned ID from TAble1
    and when TableTYPE is table2, TABLEID should be assigned ID from TABLE2

    Is that possible. How can i get this behavior. The whole purpose of relationships is not constraint checking as much as assigning right ID values in a dataset.

    Hananiel

  2. #2
    Join Date
    Jan 2004
    Location
    Romania - Bucharest
    Posts
    50

    Re: Multiple-Parents

    I think you should create a "dummy" parent table, let's call it "D", having 1-1 relationships to Table1 and Table2 and then you should link Table3 to table "D"

    Something like that:

    Table D: - has a field D_Id, of "autonumber" type

    Table1 has a 1-1 relationship with table D on D_Id

    Table2 has a 1-1 relationship with table D on D_Id

    D has a 1-M relationship with Table3, on D_Id as primary key (Table3 is the "Slave" table)

    Maro

    Originally posted by Hananiel
    Can I have two different parents for the same child table in a dataset. The columns for which the relationships exist are the same:

    For ex:

    TABLE1

    ID DATA

    TABLE2

    ID DATA

    TABLE3

    ID TABLETYPE TABLEID DATA


    When TableTYPE is table1, TABLEID should be assigned ID from TAble1
    and when TableTYPE is table2, TABLEID should be assigned ID from TABLE2

    Is that possible. How can i get this behavior. The whole purpose of relationships is not constraint checking as much as assigning right ID values in a dataset.

    Hananiel

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •