Which modules to implement RDBMS in Elixir/Erlang effectively?

For serialization, you could use the built in erlang:term_to_binary/1 on any term, and use zlib — OTP 29.0.2 (erts 17.0.2) for compression, or an external zstd library.