A MySQL upsert helper: insert a row, or if a unique key collides, update the same row with the new values. Returns whether the row was inserted (true) or updated (false).
Open a PDO connection with all the options you almost always want: real prepared statements, exceptions on error, associative-array fetch mode, UTF-8 charset.
A column whose value is derived from other columns and maintained automatically. PostgreSQL has STORED (persisted) and MySQL adds VIRTUAL (computed on read). Saves you from triggers for derived data.
MySQL's flavor of upsert. Triggers when an INSERT would violate a PRIMARY KEY or UNIQUE constraint. Use `VALUES()` (or `NEW.col` in MySQL 8.0.20+) to reference the would-be-inserted row.