Invoices - Mailing list pgsql-general

From Ludwig Meyerhoff
Subject Invoices
Date
Msg-id Pine.LNX.4.21.0105032153120.14951-100000@ludwig
Whole thread Raw
Responses Re: Invoices
Re: Invoices
List pgsql-general
Hallo!

Maybe this is a bit off-topic, as this problem is more a "design"-one, but
I wanted to write a web-application write invoices more easy. I wonder if
it was a good idea to try this using Postgres or if it was better to write
the data of each invoice in a separate file in a separate directory.

I doubt it was a good idea to put all the data into one database like

create table invoices(
  invoice integer primary key,
  datum date,
  customer integer references customers,
  clerk integer references clerks
);
create table invoicedata(
  invoice integer references invoices,
  item integer references services,
);


as this would mean all the information of all invoices is stored in one
table, meaning the table will grow to a HUGE size making queries very
slow.


On the other side I doubt following solution will be a good idea, too!

create table invoices
(
  invoice integer primary key,
  datum date,
  customer integer references customers,
  clerk integer references clerk
);
create table INVOICENUMBER
(
  item integer references services,
  amount integer,
);

as this will create a HUGE number of tables and I think it was not a good
idea to give users permission to create new tables.


Maybe someone can help?


Saluti!

Ludwig


pgsql-general by date:

Previous
From: "Mitch Vincent"
Date:
Subject: Re: Ideal hardware - OS Wars are silly.
Next
From: teg@redhat.com (Trond Eivind Glomsrød)
Date:
Subject: Re: Ideal hardware configuration for pgsql