Materialize is a sweet system for maintaining SQL queries as your data change. In particular, it is great at maintaining relational *JOINS*, which we'll talk through here. There are a few ways you could do this, and Materialize is able to do some pretty clever things that keep your memory requirements down.
We'll work through some examples from TPC-H, moving through increasingly sophisticated (in Materialize) techniques that require less and less standing memory.
You can also read about this in blog post format: https://materialize.com/joins-in-materialize/
https://github.com/frankmcsherry/blog/blob/master/posts/2020-11-18.md