• JackbyDev@programming.dev
    link
    fedilink
    English
    arrow-up
    0
    ·
    6 days ago

    Why is there a separate table for men and women in the first place? Shouldn’t there be a person table with a many to many relationship with itself (because polyamory exists)?

    • ResoluteCatnap@lemmy.ml
      link
      fedilink
      English
      arrow-up
      0
      ·
      6 days ago

      To that point a person table with a relationship table. So this way you can reference relationship between two or more persons within the relationship table and that could be joined to the person table if needed. I don’t think you’d really be able to keep it within one table while exploring multiple relationships unless you’re storing a list of ids that is interpreted outside of sql. Also a relationship table would allow exploring other types of relationships such as exes, love interests, coworkers, family, friends, etc

      • Thomrade@lemm.ee
        link
        fedilink
        English
        arrow-up
        0
        ·
        6 days ago

        Yeah it’d be a person table, and the relationship table indicating the ids of shipped couples. Do you think there’d need to be a status in the relationship table so we can tombstone exes? Or maybe started and ended date columns for each relationship so we can figure out whose cheating on who. But when about on-off relationships then? How would we model Ross and Rachel?