Documentation for PostgreSQL’s JSON data type Summary Notes on using PostgreSQL’s JSON data-type using a hypothetical alerting system. The system receives a stream of system metrics and has different types of triggers which are associated with multiple types of subscribers.
Demonstrated with two types of trigger: system load and filesystem usage.
Tables Example table diagram with triggers and subscribers, where each is associated with a user. The triggers and subscribers are also linked to each other via a many-to-many (junction) table.
Documentation for PostgreSQL’s Table Inheritance Table Inheritance Caveats Summary Notes on using PostgreSQL’s Table Interitance using a hypothetical alerting system. The system receives a stream of system metrics and has different types of triggers which are associated with multiple types of subscribers.
Demonstrated with two types of trigger: system load and filesystem usage.
Tables Example table diagram with triggers and subscribers, where each is associated with a user. The triggers and subscribers are also linked to each other via a many-to-many (junction) table.
Two strategies for modeling polymorphic associations in a relational database schema.
Both of these strategies make use of features in PostgreSQL.
Using Table Inheritance Using the JSON data type