Commit 2cc3935a authored by Nathan Bonnemberger's avatar Nathan Bonnemberger
Browse files

last with fiel holding script to creat and load sfp database from a csv

parent c21bf486
CREATE TABLE Buildings (Id serial PRIMARY KEY, Type varchar(25) check (Type in ('house','habitation tower','office tower','craft workshop','school','shop')), Xsize integer NOT NULL, Ysize integer NOT NULL, Shape varchar(25) check (Shape in ('circle','square','rectangle')) NOT NULL, Floors integer NOT NULL, Insulation varchar(25) check (Insulation in ('bad','average','good')), Quality varchar(25) check (Quality in ('bad','average','good')), School_size varchar(25) check (School_size in ('small','medium','big')), Construction_costs money NOT NULL, Costs_with_garage money NOT NULL);
COPY buildings(type,xsize,y,size,shape,floors,insulation,quality,school_size,construction_costs,costs_with_garage)
FROM '/home/nathan/Bureau/stage2a/databaseSFP.csv' DELIMITER ',' CSV HEADER;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment