• AijanOP
    link
    fedilink
    arrow-up
    3
    ·
    8 months ago

    Yes, that’s correct. Here’s how an entry in the join table looks like:

    {
      "id": 6,
      "sourceComp": "user",
      "sourceId": 2,
      "targetComp": "post",
      "targetId": 3,
      "type": "author",
      "createdAt": "2024-03-28T13:28:59.175Z",
      "updatedAt": "2024-03-28T13:28:59.175Z"
    }
    
    • Kache@lemm.ee
      link
      fedilink
      arrow-up
      6
      ·
      edit-2
      8 months ago

      Fine for prototyping, but adds a scaling tech debt “time bomb” for a live system. Those associations had better be really sparse.

      • AijanOP
        link
        fedilink
        arrow-up
        2
        ·
        8 months ago

        There’s certainly the danger of creating too many ad-hoc or sparse relationships, which can cause issues. That said, when used for supplementing foreign keys, Tie-in can be a useful tool in a production system as well.

      • AijanOP
        link
        fedilink
        arrow-up
        3
        ·
        edit-2
        8 months ago

        That idea crossed my mind too, but you can’t really use the full capabilities of SQL in graph databases, and that’s a deal breaker for me.