https://microcumul.us

Just chilling

  • 7 Posts
  • 156 Comments
Joined 1 year ago
cake
Cake day: June 14th, 2023

help-circle



  • Star spangled banner, autocorrect edition:

    Oh Daddy can you see by the Dawn’s easily long What do probably we jailed add the Twilight last glowing Whoa being strips and bright state They’d the person force Or the ramparts we watched We’re so thankful streaming

    And the tickets red flare The bonds busting in sure Have proof their the night That it flat was still there

    Oh saw guys that day spangled banner yet and Or the leave of the few And the home of the brave







  • The real primary benefit of storing your relationships in a separate place is that it becomes a point of entry for scans or alterations instead of scanning all entries of one of the larger entity types. For example, “how many users have favorited movie X” is a query on one smaller table (and likely much better optimized on modern processor architectures) vs across all favorites of all users. And “movie x2 is deleted so let’s remove all references to it” is again a single table to alter.

    Another benefit regardless of language is normalization. You can keep your entities distinct, and can operate on only one of either. This matters a lot more the more relationships you have between instances of both entities. You could get away with your json array containing IDs of movies rather than storing the joins separately, but that still loses for efficiency when compared to a third relationship table.

    The biggest win for design is normalization. Store entities separately and updates or scans will require significantly less rewriting. And there are degrees of it, each with benefits and trade-offs.








  • andrew@lemmy.stuart.funOPtolinuxmemes@lemmy.worldThe Sign
    link
    fedilink
    English
    arrow-up
    7
    ·
    4 months ago

    I think it was big for easy local dev setups in a VM. But I think docker has pretty much taken over a lot of those use cases since a build can happen in a container pretty trivially across platforms these days. Plus be ready to deploy with the same tools, which Vagrant didn’t cover.