Hiya,

Not really CGI::App specific, but you guys are a sounding board for
CGI related stuff that I trust. You ask on groups you don't kwno and
you just get a bunch of really dumb answers :)

I'm working on an ecommerce site for a company in Quebec. Site is in
english now and if they don't switch in a month, the QC gov't sues
them. Awesome, go Quebec ! [and I live here]

So for the product gallery , this is the schema I was thinking of, I
want it to be flexible for when Quebec makes Mandarin, Italian and
Martian manditory languages.

CREATE TABLE products (
  id SERIAL PRIMARY KEY,
  price numeric(10,2),
  instock int default 0,
  taxable boolean
);

CREATE TABLE actual_products (
  productid int REFERENCES products(id),
  lang char(2) REFERENCES languages(lang),
  title text,
  description text,
  specialinstructions text
);

CREATE unique index actual_products_idx ON actual_products(productid,lang);

I'm thinking about doing this sort of layout for my table of
provinces, countries and any other select lists i draw upon.

Alternativly I could just put them all in the same table, but that
seems to stray from the relational guidelines of not reproducing the
same data twice [ie price, taxable etc]

Jeff.
-- 
Jeff MacDonald
http://www.halifaxbudolife.ca
http://www.nintai.ca

---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[email protected]/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to