Menu

#21 Allow Relations to be defined inside Objects

Next_Release
accepted
Gulliver
None
1
2014-02-26
2014-02-25
Shun Yu
No

It would be great if it was possible to define more flexible relations. One example would be defining relations INSIDE objects, linked to other objects.

So that instead of keeping a separate table where one would store the relation in the database, it can use a foreign key. This way it's possible to reduce database footprint and also give more options to the developer.

Discussion

  • Gulliver

    Gulliver - 2014-02-25
    • status: open --> accepted
    • assigned_to: Gulliver
     
  • Gulliver

    Gulliver - 2014-02-25

    I thought about this also.

    One special case is a 1:many relation (to another entry?) with no additional fields, this could be mapped into a foreign key relation inside the table (on the 1 side).

    easier defining of relations is not bound to this special case, i would define this as another issue.

     
  • Anonymous

    Anonymous - 2014-02-26

    Can you explain the special case a little more? Do you mean you can just define it as a table with just foreign keys, and for each target on the many side, you have a entry in the table?

     
    • Gulliver

      Gulliver - 2014-02-26

      For One-To-Many Relations it is possible to make a better representation in the database. Instead of using a separate table for the relation you store the id of the many-Side into a table row on the "one"-side entity of the relation (and use it as foreign key to the other relation side).

      a many-to-many relation needs a separate table for the relation, storing the id of both sides in a table row (both sides used as foreign key).

       

Anonymous
Anonymous

Add attachments
Cancel





Auth0 Logo