1 Reply Latest reply on Sep 8, 2011 12:07 PM by philmodjunk

    Multiple relations from one datebase to to another

    JohnFalck

      Title

      Multiple relations from one datebase to to another

      Post

       Hi

      I have a Datebase where I enter all my rabit details called <Rabit Card> I then created a <Batch Card> that record all the matings and activities for my breeding purposes.  The <Rabit Card> have a tab call <Mating Details> where I record the doe and the multiple bucks (up to 4) that I use to breed one doe.

      I get the first relation right where I simple insert the cage number for the doe on the <Batch card> and the details like doe ID name age breed etc is displayed.  The problem is when I add another buck cage number from the same database <Rabit Card> there is a clash between the data and all the fields go blank unless the the two cage numbers for the bucks and doe are the same.

      How do I get to display at least 5 different animals detail on the <Bath card> without creating 5 different database that will duplicates of each other just with different names to get the relation on one <Batch Card> (5 different cage numers) from fiive different databases. 

      All info about rabbits ase located in one databas as a refference <Rabbit Card>

      Please help

      Thanks

        • 1. Re: Multiple relations from one datebase to to another
          philmodjunk

          Sounds like you need to document mating pairs where any given rabbit might be paired with any number of other rabbits. Just as a doe can be mated to more than one buck, I'd guess that you are also mating a buck to more than one doe. If so, you have a many to many relationship and you need a third table to document each pairing.

          Rabbits---<Pairing>-----RabbitMates

          where Rabbitmates is a second occurrence of Rabbits. It is not a separate table.

          Rabbits::RabbitID = Pairing::RabbitID1
          Rabbitmates::RabbitID = Pairing::RabbitID2

          Additional fields in the pairing table can be used to document details of that specific mating--such as the date it took place.

          A portal to Pairing on the Rabbits layout can list all the matings for a given rabbit (whether the rabbit be male or female). Fields from RabbitMates can be included in the portal to show information about each mate.