From: NbForYou <nbforyou@hotmail.com>
To: pgsql-performance@postgresql.org
Subject: database model tshirt sizes
Date: Sat, 18 Mar 2006 16:03:59 +0100
Message-ID: <BAY107-DAV1733CA91BFC0258E76EC46DBE50@phx.gbl> (raw)
Hello,
Does anybody know how to build a database model to include sizes for rings, tshirts, etc?
the current database is built like:
table product
=========
productid int8 PK
productname charvar(255)
quantity int4
what i want now is that WHEN (not all products have multiple sizes) there are multiple sizes available. The sizes are stored into the database. I was wondering to include a extra table:
table sizes:
========
productid int8 FK
size varchar(100)
but then i have a quantity problem. Because now not all size quantities can be stored into this table, because it allready exist in my product table.
How do professionals do it? How do they make their model to include sizes if any available?
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: nbforyou@hotmail.com
Subject: Re: database model tshirt sizes
In-Reply-To: <BAY107-DAV1733CA91BFC0258E76EC46DBE50@phx.gbl>
References: <BAY107-DAV1733CA91BFC0258E76EC46DBE50@phx.gbl>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox