DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

TPC-W Code For Shopping_cart/shopping_cart_line Temp Hack

11.17.2008
| 1186 views |
  • submit to reddit
        
CREATE SEQUENCE sc_id_seq;
CREATE SEQUENCE scl_id_seq;

-- DROP TABLE shopping_cart;
CREATE TABLE shopping_cart
(
  sc_id INTEGER NOT NULL PRIMARY KEY DEFAULT nextval('sc_id_seq'),
  sc_date timestamp without time zone
)
WITH (OIDS=FALSE);
ALTER TABLE shopping_cart OWNER TO postgres;

-- DROP TABLE shopping_cart_line;
CREATE TABLE shopping_cart_line
(
  scl_id INTEGER NOT NULL PRIMARY KEY DEFAULT nextval('scl_id_seq'),
  scl_sc_id integer NOT NULL,
  scl_qty integer,
  scl_i_id integer NOT NULL
)
WITH (OIDS=FALSE);
ALTER TABLE shopping_cart_line OWNER TO postgres;