ALTER SQL objects
ALTER DATABASE
ALTER DATABASE
Unlike regular triggers, which are attached to a single table and capture only DML (Data Manipulation Language) events, event triggers are global to a particular database and are capable of capturing DDL (Data Definition Language) events.
In relational databases like Postgres, a relationship between entities, i.e., tables, is implemented by storing the primary key of one entity as a pointer or "foreign key" in the table of another entity.
PostgreSQL offers native support for JSON and JSONB data types, allowing you to store JSON documents directly in your tables. However, ensuring that these JSON documents adhere to a specific schema requires additional mechanisms. There are extensions like json-schema and json-schema-validator that can be used to validate JSON documents against a schema. We can do simple validation without relying on extensions.
PostgreSQL supports a wide range of data types. In this article, we will discuss some of the most commonly used data types in PostgreSQL.
Let's consider the below tables for a simple blog application.