Two One-to-many relationships pointing to the same table

Tap Forms – Organizer Database App for Mac, iPhone, and iPad Forums Using Tap Forms Two One-to-many relationships pointing to the same table

Viewing 6 reply threads
  • Author
    Posts
  • February 28, 2016 at 9:51 AM #16002

    maxasara
    Participant

    Hi,

    I’m just starting with Tap Forms, and it seems really awesome.
    I’m building a database using some usual basic structures. Some of them rely on relationships like the one shown in this example:

    Person (name, phone, [Roles in Projects]) one
                                                                          to many
                                                                                    Role in a project ([Person], Role, notes, [Project])
                                                                          to many
    Project (name, value, [Roles]) one

    Such architecture is a simple way to link Persons and Projects with a many-to-many relationship, giving a particular quality (the Role) to each single relationship.

    In this way, getting into the person Jimmy I can see that his role is Consultant for the project Abbey Grocery, and his role is Client for the project Green Campaign.
    Getting into the project Abbey Grocery I can see there’s a role of Consultant played by Jimmy, and a role of Security played by Jack.

    As you can see, one person can play many roles (each linked with only one project) and one project is linked to many roles (each linked to only one person).
    In such basic db structure, which works flawlessly in mysql and access for example, the key is using one-to-many links on both sides. Using many-to-many on one or both sides would be misleading.

    Maybe I’ve found the same issue in the forum, a thread of 2014 talking about mothers, fathers, and children. In 2014 a child had to have one only parent, or a potentially infinite number of parents. This because in Tap Forms a table couldn’t be linked by two tables in a one-to-many relationship: once set the mother, the father disappears and vice-versa.

    I’m experimenting the same issue now, so I can’t translate to Tap Forms the architectures working in all the other database systems I work with, which would be really awesome. Please tell me if I’m missing something, or if this limit’s gonna be fixed, or if there’s an equivalent way I can use to set a table of exclusive links (like Roles) between two main tables (like Persons and Projects).

    Thanks a lot.

    February 28, 2016 at 12:50 PM #16009

    Brendan
    Keymaster

    Yes, this is still an issue in the current version of Tap Forms. However, it’s something I’ve rectified in an upgrade I’m working on. The reason it’s not working for you with two relationships is because the link is established at the record level. Each record has only one “link from record id” and “link from field id”. And that means that a record can only be linked to by one parent record. In the upgrade I’m working on, I’ve modelled the one-to-many relationship differently so it removes this restriction. In fact, I’ve modelled it the same way as I model many-to-many relationships with an intermediate join table. It’s just that internally I enforce the rule that a record can only belong to one parent for a one-to-many relationship.

    February 28, 2016 at 12:56 PM #16010

    maxasara
    Participant

    I’m happy to hear it. Can’t wait for such upgrade! It’s really major to me.
    Thanks Brendan!

    March 28, 2016 at 1:12 AM #16226

    maxasara
    Participant

    Hi Brendan,
    is there a time forecast for publishing the new version with the fix on this issue?
    I just can’t wait to complete a full working tool.
    Cheers,

    March 28, 2016 at 2:46 AM #16229

    Brendan
    Keymaster

    Hi Max,

    I’m aiming for 2 months from now roughly. It’s a bug upgrade, so taking a while to complete. Lots of t’s to cross and i’s to dot :)

    Thanks,

    Brendan

    November 30, 2016 at 11:10 PM #20515

    maxasara
    Participant

    Hi Brendan,
    has this issue been fixed? It would be a great upgrade for the db structure.
    Thanks

    December 1, 2016 at 2:25 AM #20517

    Brendan
    Keymaster

    Yes. If you download the Tap Forms 5 Mac trial version you can give it a try for yourself.

Viewing 6 reply threads

You must be logged in to reply to this topic.