Re: Difficulty modelling sales taxes

David G. Johnston <david.g.johnston@gmail.com>

From: "David G. Johnston" <david.g.johnston@gmail.com>
To: Frank Millman <frank@chagford.com>
Cc: "pgsql-general@postgresql.org" <pgsql-general@postgresql.org>
Date: 2017-01-02T16:17:07Z
Lists: pgsql-general
On Mon, Jan 2, 2017 at 3:33 AM, Frank Millman <frank@chagford.com> wrote:

>
>     CONSTRAINT _prod_tax_code_2 FOREIGN KEY (category_id, tax_code)
> REFERENCES tax_codes (category_id, code));
>

​This is ​typical solution to this modelling problem.  If you need to do
other stuff (introduce redundancies) to make it play nice with the ORM then
that is valid if unfortunate.

David J.