YHCZCZJ2VJPIBOSIHZIBRHITOU47MOA52LYIIFGV7YIPP7ZC4XCQC
#database design
!(schema.png)
`product_with_history` and any other columns suffixed with `with_history` are intentionally not foreign keys, since `temporal_tables` guarantees the validity. see http://clarkdave.net/2015/02/historical-records-with-postgresql-and-temporal-tables-and-sql-2011/