Re: database model tshirt sizes

From: Patrick Hatcher <PHatcher(at)macys(dot)com>
To: "NbForYou" <nbforyou(at)hotmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org, pgsql-performance-owner(at)postgresql(dot)org
Subject: Re: database model tshirt sizes
Date: 2006-03-19 13:59:35
Message-ID: OFB3D1D1B9.EA343285-ON88257136.004C4C08-88257136.004CDDC8@FDS.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

We have size and color in the product table itself. It is really an
attribute of the product. If you update the availability of the product
often, I would split out the quantity into a separate table so that you can
truncate and update as needed.

Patrick Hatcher
Development Manager Analytics/MIO
Macys.com


"NbForYou"
<nbforyou(at)hotmail
.com> To
Sent by: <pgsql-performance(at)postgresql(dot)org>
pgsql-performance cc
-owner(at)postgresql
.org Subject
[PERFORM] database model tshirt
sizes
03/18/06 07:03 AM




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?

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message me 2006-03-19 14:37:53 Re: database model tshirt sizes
Previous Message Antoine 2006-03-19 12:31:42 partitioning