Company
Date Published
Author
Brecht De Rooms, Kirk Kirkconnell
Word count
2286
Language
English
Hacker News points
None

Summary

Modernizing from PostgreSQL to Serverless with Fauna Part 2` discusses adapting a DVD rental business data model from PostgreSQL to Fauna, a serverless database that combines relational and document models. The authors explore how to query many-to-many relationships in a normalized fashion using different approaches. They introduce the association table model, which is similar to traditional RDBMS, but with references instead of foreign keys. The authors also discuss optimizing many-to-many relationships by reducing them to one-to-many with arrays of references or denormalizing categories into a single field in the film document. These optimizations can improve performance and storage efficiency. The article concludes that Fauna's capabilities make it an attractive choice for many applications, but it's essential to evaluate trade-offs and techniques to ensure data correctness.