In general, you can use the events / notifications of the database, the exact term, and the implementation depends on the DBMS, as each uses a mechanism different. Firebird for example implements this using the POST_EVENT
statement, PostgreSQL uses NOTIFY
, etc.
With FireDAC, you can get alerts using the component TFDEventAlerter
, the Database Alerts (FireDAC) > Embarcadero mentions:
The DBMS alert refers to a database notification or alert
sent by a database trigger or stored procedure
with the objective of notifying a database client about some
events on the database side.
An alert is identified by name and can include arguments
additional. Customers are registering with alerts. Multiple customers
can register with a single alert, and a client can register
with multiple alerts. When an alert is signaled on a
all registered customers will be notified of this.
When an alert is no longer used, the application cancels the registration for
this alert.