intermediate schema MySQL MariaDB SQL Server PostgreSQL SQLite
Store a Computed Value Automatically With Generated Columns
Define a column whose value is always derived from an expression over other columns — the database recomputes or stores it on every write so queries never need to repeat the formula.