https://microcumul.us

Just chilling

  • 0 Posts
  • 25 Comments
Joined 2 years ago
cake
Cake day: June 14th, 2023

help-circle
  • 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.








  • Well yeah. I guess if you want to DIY a solution there’s a lot more you can do. My issue is building a polished finished product rather than exposed wires and a switch, since I have the wife approval factor to consider now. So it’s easiest for me to buy a smart outlet and a button or switch vs wiring up my own solution and trying to 3d print a case these days.


  • I started off WiFi and ended up on zigbee for the most part. The major downside of wifi is how many devices are cloud/proprietary but it sounds like you’re using esphome so that’s not an issue. I definitely like my zigbee devices as they also tend to be slightly cheaper, but starting with WiFi is an easy progression definitely.

    Getting a USB zigbee device is about all you need to get up and running and adding to your mesh, which I definitely recommend eventually.