On Mon, 2 Jan 2017 12:33:04 +0200
"Frank Millman" wrote:
>
> I want to model sales taxes in a flexible manner. I need one table to define
> tax categories (e.g. VAT) and a subsidiary table to define tax codes within
> each category (e.g. Standard Rate).
>
> CREATE TABLE tax_categories (
>
On 01/02/2017 08:02 AM, Melvin Davidson wrote:
*First, there is no need to make row_id's when you already have
a valid
primary key.
In a perfect world yes, but this is a world with ORM's as I found
out the hard way:
https://docs.djangoproject.com/en/1.
On Mon, Jan 2, 2017 at 7:38 AM, Melvin Davidson
wrote:
>
>
> *Next, DO NOT begin object names with underscores.*
>
This is only a bit arbitrary (though I do subscribe to it)...naming custom
data types or tables with underscores is likely to introduce problems since
an implementation detail of P
On Mon, Jan 2, 2017 at 3:33 AM, Frank Millman 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 pla
* Monday, January 02, 2017 12:42 PM
>> *To:* Frank Millman
>> *Cc:* pgsql-general
>> *Subject:* Re: [GENERAL] Difficulty modelling sales taxes
>>
>> > On Mon, Jan 2, 2017 at 4:03 PM, Frank Millman > <mailto:fr...@chagford.com>> wrote:
>&
On 01/02/2017 06:38 AM, Melvin Davidson wrote:
On Mon, Jan 2, 2017 at 6:29 AM, Frank Millman mailto:fr...@chagford.com>> wrote:
*From:* amul sul
*Sent:* Monday, January 02, 2017 12:42 PM
*To:* Frank Millman
*Cc:* pgsql-general
*Subject:* Re: [GENERAL] Difficulty mod
On Mon, Jan 2, 2017 at 6:29 AM, Frank Millman wrote:
>
> *From:* amul sul
> *Sent:* Monday, January 02, 2017 12:42 PM
> *To:* Frank Millman
> *Cc:* pgsql-general
> *Subject:* Re: [GENERAL] Difficulty modelling sales taxes
>
> > On Mon, Jan 2, 2017 at 4:03 PM, Frank M
From: amul sul
Sent: Monday, January 02, 2017 12:42 PM
To: Frank Millman
Cc: pgsql-general
Subject: Re: [GENERAL] Difficulty modelling sales taxes
> On Mon, Jan 2, 2017 at 4:03 PM, Frank Millman wrote:
> > Hi all
> >
> > It is a bit ugly, because I have to use the ‘NVARC
On Mon, Jan 2, 2017 at 4:03 PM, Frank Millman wrote:
> Hi all
>
> It is a bit ugly, because I have to use the ‘NVARCHAR code’ column from
> tax_codes, not the primary key, but I think it would work.
>
NVARCHAR ? Are you using PostgreSQL as database server?
Regards,
Amul
--
Sent via pgsql-gene
Hi all
I want to model sales taxes in a flexible manner. I need one table to define
tax categories (e.g. VAT) and a subsidiary table to define tax codes within
each category (e.g. Standard Rate).
CREATE TABLE tax_categories (
row_id SERIAL PRIMARY KEY,
category NVARCHAR NOT NULL,
de
10 matches
Mail list logo