# mysql dump
#

# Host: ambryn    Database: test
#--------------------------------------------------------

#
# For all articles, a description should be added (text and picture)
# The first seven attributes exist in all the tables. (from ref to price)
#
# Each store's name should not contain any space.
#
# a product identifier is : reference + attributes (from the 8th attribute)
#

# clean up
DROP TABLE PDT_clothes ;
DROP TABLE PDT_food ;
DROP TABLE stores ;
DROP TABLE clients ;
DROP TABLE Order_food ;
DROP TABLE Order_clothes ;

#
# Table structure for table 'PDT_clothes'
#
CREATE TABLE PDT_clothes (
  ref int,
  type varchar(30),
  name varchar(30),
  store varchar(3),
  unit varchar(10),
  description varchar(100),
  price float,
  color varchar(30),
  size varchar(15),
  material varchar(30)
);

#
# Dumping data for table 'clothes'
#


INSERT INTO PDT_clothes VALUES (1, 'hat', 'magic hat', 'CLO', 'number', 'keeps your head warm', 19.99, 'black', 'small', 'camel whool');
INSERT INTO PDT_clothes VALUES (1, 'hat', 'magic hat', 'CLO', 'number', 'keeps your head warm', 20.99, 'black', 'medium', 'camel whool');
INSERT INTO PDT_clothes VALUES (1, 'hat', 'magic hat', 'CLO', 'number', 'keeps your head warm', 21.99, 'black', 'large', 'camel whool');
INSERT INTO PDT_clothes VALUES (1, 'hat', 'magic hat', 'CLO', 'number', 'keeps your head warm', 22.99, 'black', 'extra-large', 'camel whool');
INSERT INTO PDT_clothes VALUES (1, 'hat', 'magic hat', 'CLO', 'number', 'keeps your head warm', 19.99, 'grey', 'small', 'camel whool');
INSERT INTO PDT_clothes VALUES (1, 'hat', 'magic hat', 'CLO', 'number', 'keeps your head warm', 20.99, 'grey', 'medium', 'camel whool');
INSERT INTO PDT_clothes VALUES (1, 'hat', 'magic hat', 'CLO', 'number', 'keeps your head warm', 21.99, 'grey', 'large', 'camel whool');
INSERT INTO PDT_clothes VALUES (1, 'hat', 'magic hat', 'CLO', 'number', 'keeps your head warm', 22.99, 'grey', 'extra-large', 'camel whool');

INSERT INTO PDT_clothes VALUES (2, 'pullover', 'sport pullover', 'CLO', 'number', 'fantastic for running', 79.90,'blue', 'small', '50% whool, 50% acrylic');
INSERT INTO PDT_clothes VALUES (2, 'pullover', 'sport pullover', 'CLO', 'number', 'fantastic for running', 79.90,'blue', 'medium', '50% whool, 50% acrylic');
INSERT INTO PDT_clothes VALUES (2, 'pullover', 'sport pullover', 'CLO', 'number', 'fantastic for running', 79.90,'blue', 'large', '50% whool, 50% acrylic');
INSERT INTO PDT_clothes VALUES (2, 'pullover', 'sport pullover', 'CLO', 'number', 'fantastic for running', 79.90,'blue', 'extra-large', '50% whool, 50% acrylic');
INSERT INTO PDT_clothes VALUES (2, 'pullover', 'sport pullover', 'CLO', 'number', 'fantastic for running', 75.90,'green with red spots', 'small', '50% whool, 50% acrylic');
INSERT INTO PDT_clothes VALUES (2, 'pullover', 'sport pullover', 'CLO', 'number', 'fantastic for running', 75.90,'green with red spots', 'medium', '50% whool, 50% acrylic');
INSERT INTO PDT_clothes VALUES (2, 'pullover', 'sport pullover', 'CLO', 'number', 'fantastic for running', 75.90,'green with red spots', 'large', '50% whool, 50% acrylic');
INSERT INTO PDT_clothes VALUES (2, 'pullover', 'sport pullover', 'CLO', 'number', 'fantastic for running', 75.90,'green with red spots', 'extra-large', '50% whool, 50% acrylic');

INSERT INTO PDT_clothes VALUES (3, 'pullover', 'country pullover', 'CLO', 'number', 'great in winter', 89.90, 'brown', 'small', '100% lamb whool');
INSERT INTO PDT_clothes VALUES (3, 'pullover', 'country pullover', 'CLO', 'number', 'great in winter', 89.90, 'brown', 'medium', '100% lamb whool');
INSERT INTO PDT_clothes VALUES (3, 'pullover', 'country pullover', 'CLO', 'number', 'great in winter', 89.90, 'brown', 'large', '100% lamb whool');
INSERT INTO PDT_clothes VALUES (3, 'pullover', 'country pullover', 'CLO', 'number', 'great in winter', 89.90, 'brown', 'extra-large', '100% lamb whool');
INSERT INTO PDT_clothes VALUES (3, 'pullover', 'country pullover', 'CLO', 'number', 'great in winter', 89.90, 'green', 'small', '100% lamb whool');
INSERT INTO PDT_clothes VALUES (3, 'pullover', 'country pullover', 'CLO', 'number', 'great in winter', 89.90, 'green', 'medium', '100% lamb whool');
INSERT INTO PDT_clothes VALUES (3, 'pullover', 'country pullover', 'CLO', 'number', 'great in winter', 89.90, 'green', 'large', '100% lamb whool');
INSERT INTO PDT_clothes VALUES (3, 'pullover', 'country pullover', 'CLO', 'number', 'great in winter', 89.90, 'green', 'extra-large', '100% lamb whool');



#
# Table structure for table 'PDT_food'
#
CREATE TABLE PDT_food (
  ref int,
  type varchar(30),
  name varchar(30),
  store varchar(3),
  unit varchar(10),
  description varchar(100),
  price float,
  specie varchar(30)
);


INSERT INTO PDT_food VALUES (1, 'apple', 'apple', 'FOO', 'kg', 'perfect apples', 1.15, "golden" ) ;
INSERT INTO PDT_food VALUES (1, 'apple', 'apple', 'FOO', 'kg', 'perfect apples', 1.45, "grany" ) ;
INSERT INTO PDT_food VALUES (1, 'apple', 'apple', 'FOO', 'kg', 'perfect apples', 1.25, "bosco" ) ;
INSERT INTO PDT_food VALUES (2, 'ananas', 'ananas', 'FOO', 'kg', 'great ananas', 3.25, "just ananas" ) ;
INSERT INTO PDT_food VALUES (3, 'cherry', 'spanish cherry', 'FOO', 'kg', 'the best ones', 4.50, "burlat") ;
INSERT INTO PDT_food VALUES (3, 'cherry', 'spanish cherry', 'FOO', 'kg', 'the best ones', 3.75, "pigeon hart") ;

#
# Table structure for table 'stores'
#
CREATE TABLE stores (
  ref varchar(3) primary key,
  name varchar(30),
  address varchar(100), 
  city varchar(30),
  description varchar(100),
  bank varchar(30),
  account varchar(15)
);


INSERT INTO stores VALUES ('CLO', 'clothes', 'place L. Armstrong', 'Grenoble', 'pullovers, hats, that ''s all !', 'BNP', 'C_1') ;
INSERT INTO stores VALUES ('FOO', 'food', 'place L. Armstrong', 'Grenoble', 'apples, cherries, ananas ...', 'BNP', 'C_2') ;


#
# Table structure for table 'Order_clothes'
#
CREATE TABLE Order_clothes (
  transaction varchar(30),
  ref int,
  color varchar(30),
  size varchar(15),
  material varchar(30),
  quantity float
);


#
# Table structure for table 'Order_food'
#
CREATE TABLE Order_food (
  transaction varchar(30),
  ref int,
  specie varchar(30),
  quantity float
);


#
# Table structure for table 'clients'
#
CREATE TABLE clients (
  transaction varchar(30),
  firstName varchar(30),
  lastName varchar(30),
  address varchar(30),
  city varchar(30),
  email varchar(30)
);








