city simulator: tables
table: city
DROP TABLE IF EXISTS city; CREATE TABLE city ( id int(10) unsigned NOT NULL AUTO_INCREMENT, name varchar(45) NOT NULL, PRIMARY KEY (id) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
table: citySection
DROP TABLE IF EXISTS citySection; CREATE TABLE citySection ( id int(10) unsigned NOT NULL AUTO_INCREMENT, cityId int(10) unsigned NOT NULL, name varchar(45) NOT NULL, imgUrl varchar(100) NULL, height varchar(6) NULL, width varchar(6) NULL, PRIMARY KEY (id) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
table: sectionArea
DROP TABLE IF EXISTS sectionArea; CREATE TABLE sectionArea ( id int(10) unsigned NOT NULL AUTO_INCREMENT, name varchar(45) NOT NULL, description varchar(255) NULL, PRIMARY KEY (id) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
table: cityBlock
DROP TABLE IF EXISTS cityBlock; CREATE TABLE cityBlock ( id int(10) unsigned NOT NULL AUTO_INCREMENT, citySectionId int(10) unsigned NOT NULL, sectionAreaId int(10) unsigned NULL, name varchar(45) NOT NULL, imgUrl varchar(100) NULL, height varchar(6) NULL, width varchar(6) NULL, imgMapCoords varchar(500) NULL, proximity varchar(1000) NULL, PRIMARY KEY (id) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
table: building
DROP TABLE IF EXISTS building; CREATE TABLE building ( id int(10) unsigned NOT NULL AUTO_INCREMENT, cityBlockId int(10) unsigned NOT NULL, height int(10) unsigned NULL, depth int(10) unsigned NULL, buildingDimensionId int(10) unsigned NULL, buildingTypeId int(10) unsigned NULL, notability int(10) NULL, entryFloorId int(10) NULL, name varchar(45) NULL, overview varchar(200) NULL, description varchar(3000) NULL, imgMapCoords varchar(500) NULL, PRIMARY KEY (id) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
table: buildingDimension
DROP TABLE IF EXISTS buildingDimension; CREATE TABLE buildingDimension ( id int(10) unsigned NOT NULL AUTO_INCREMENT, name varchar(45) NOT NULL, imgUrl varchar(100) NOT NULL, PRIMARY KEY (id) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; INSERT buildingDimension (name,imgUrl) VALUES ('10x10','/roleplaying/design/grids/10x10.png'); INSERT buildingDimension (name,imgUrl) VALUES ('20x10','/roleplaying/design/grids/20x10.png'); INSERT buildingDimension (name,imgUrl) VALUES ('20x20','/roleplaying/design/grids/20x20.png'); INSERT buildingDimension (name,imgUrl) VALUES ('30x10','/roleplaying/design/grids/30x10.png'); INSERT buildingDimension (name,imgUrl) VALUES ('30x20','/roleplaying/design/grids/30x20.png'); INSERT buildingDimension (name,imgUrl) VALUES ('30x30','/roleplaying/design/grids/30x30.png'); INSERT buildingDimension (name,imgUrl) VALUES ('40x10','/roleplaying/design/grids/40x10.png'); INSERT buildingDimension (name,imgUrl) VALUES ('40x20','/roleplaying/design/grids/40x20.png'); INSERT buildingDimension (name,imgUrl) VALUES ('40x30','/roleplaying/design/grids/40x30.png'); INSERT buildingDimension (name,imgUrl) VALUES ('40x40','/roleplaying/design/grids/40x40.png'); INSERT buildingDimension (name,imgUrl) VALUES ('50x10','/roleplaying/design/grids/50x10.png'); INSERT buildingDimension (name,imgUrl) VALUES ('50x20','/roleplaying/design/grids/50x20.png'); INSERT buildingDimension (name,imgUrl) VALUES ('50x30','/roleplaying/design/grids/50x30.png'); INSERT buildingDimension (name,imgUrl) VALUES ('50x40','/roleplaying/design/grids/50x40.png'); INSERT buildingDimension (name,imgUrl) VALUES ('50x50','/roleplaying/design/grids/50x50.png'); INSERT buildingDimension (name,imgUrl) VALUES ('60x10','/roleplaying/design/grids/60x10.png'); INSERT buildingDimension (name,imgUrl) VALUES ('60x20','/roleplaying/design/grids/60x20.png'); INSERT buildingDimension (name,imgUrl) VALUES ('60x30','/roleplaying/design/grids/60x30.png'); INSERT buildingDimension (name,imgUrl) VALUES ('60x40','/roleplaying/design/grids/60x40.png'); INSERT buildingDimension (name,imgUrl) VALUES ('60x50','/roleplaying/design/grids/60x50.png'); INSERT buildingDimension (name,imgUrl) VALUES ('60x60','/roleplaying/design/grids/60x60.png'); INSERT buildingDimension (name,imgUrl) VALUES ('70x10','/roleplaying/design/grids/70x10.png'); INSERT buildingDimension (name,imgUrl) VALUES ('70x20','/roleplaying/design/grids/70x20.png'); INSERT buildingDimension (name,imgUrl) VALUES ('70x30','/roleplaying/design/grids/70x30.png'); INSERT buildingDimension (name,imgUrl) VALUES ('70x40','/roleplaying/design/grids/70x40.png'); INSERT buildingDimension (name,imgUrl) VALUES ('70x50','/roleplaying/design/grids/70x50.png'); INSERT buildingDimension (name,imgUrl) VALUES ('70x60','/roleplaying/design/grids/70x60.png'); INSERT buildingDimension (name,imgUrl) VALUES ('70x70','/roleplaying/design/grids/70x70.png'); INSERT buildingDimension (name,imgUrl) VALUES ('80x10','/roleplaying/design/grids/80x10.png'); INSERT buildingDimension (name,imgUrl) VALUES ('80x20','/roleplaying/design/grids/80x20.png'); INSERT buildingDimension (name,imgUrl) VALUES ('80x30','/roleplaying/design/grids/80x30.png'); INSERT buildingDimension (name,imgUrl) VALUES ('80x40','/roleplaying/design/grids/80x40.png'); INSERT buildingDimension (name,imgUrl) VALUES ('80x50','/roleplaying/design/grids/80x50.png'); INSERT buildingDimension (name,imgUrl) VALUES ('80x60','/roleplaying/design/grids/80x60.png'); INSERT buildingDimension (name,imgUrl) VALUES ('80x70','/roleplaying/design/grids/80x70.png'); INSERT buildingDimension (name,imgUrl) VALUES ('80x80','/roleplaying/design/grids/80x80.png'); INSERT buildingDimension (name,imgUrl) VALUES ('90x10','/roleplaying/design/grids/90x10.png'); INSERT buildingDimension (name,imgUrl) VALUES ('90x20','/roleplaying/design/grids/90x20.png'); INSERT buildingDimension (name,imgUrl) VALUES ('90x30','/roleplaying/design/grids/90x30.png'); INSERT buildingDimension (name,imgUrl) VALUES ('90x40','/roleplaying/design/grids/90x40.png'); INSERT buildingDimension (name,imgUrl) VALUES ('90x50','/roleplaying/design/grids/90x50.png'); INSERT buildingDimension (name,imgUrl) VALUES ('90x60','/roleplaying/design/grids/90x60.png'); INSERT buildingDimension (name,imgUrl) VALUES ('90x70','/roleplaying/design/grids/90x70.png'); INSERT buildingDimension (name,imgUrl) VALUES ('90x80','/roleplaying/design/grids/90x80.png'); INSERT buildingDimension (name,imgUrl) VALUES ('90x90','/roleplaying/design/grids/90x90.png'); INSERT buildingDimension (name,imgUrl) VALUES ('100x10','/roleplaying/design/grids/100x10.png'); INSERT buildingDimension (name,imgUrl) VALUES ('100x20','/roleplaying/design/grids/100x20.png'); INSERT buildingDimension (name,imgUrl) VALUES ('100x30','/roleplaying/design/grids/100x30.png'); INSERT buildingDimension (name,imgUrl) VALUES ('100x40','/roleplaying/design/grids/100x40.png'); INSERT buildingDimension (name,imgUrl) VALUES ('100x50','/roleplaying/design/grids/100x50.png'); INSERT buildingDimension (name,imgUrl) VALUES ('100x60','/roleplaying/design/grids/100x60.png'); INSERT buildingDimension (name,imgUrl) VALUES ('100x70','/roleplaying/design/grids/100x70.png'); INSERT buildingDimension (name,imgUrl) VALUES ('100x80','/roleplaying/design/grids/100x80.png'); INSERT buildingDimension (name,imgUrl) VALUES ('100x90','/roleplaying/design/grids/100x90.png'); INSERT buildingDimension (name,imgUrl) VALUES ('100x100','/roleplaying/design/grids/100x100.png'); INSERT buildingDimension (name,imgUrl) VALUES ('hex_4','/roleplaying/design/grids/hex_4.png'); INSERT buildingDimension (name,imgUrl) VALUES ('hex_5','/roleplaying/design/grids/hex_5.png');
table: buildingType
DROP TABLE IF EXISTS buildingType; CREATE TABLE buildingType ( id int(10) unsigned NOT NULL AUTO_INCREMENT, name varchar(45) NOT NULL, imgUrl varchar(100) NULL, PRIMARY KEY (id) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; INSERT buildingType (name,imgUrl) VALUES ('Residence','/roleplaying/design/icons/house.png'); INSERT buildingType (name,imgUrl) VALUES ('Shop','/roleplaying/design/icons/shop.jpg'); INSERT buildingType (name,imgUrl) VALUES ('Inn','/roleplaying/design/icons/bed1.gif'); INSERT buildingType (name,imgUrl) VALUES ('Tavern','/roleplaying/design/icons/beer.jpg'); INSERT buildingType (name,imgUrl) VALUES ('Service','/roleplaying/design/icons/service.jpg'); INSERT buildingType (name,imgUrl) VALUES ('Temple','/roleplaying/design/icons/temple.jpg'); INSERT buildingType (name,imgUrl) VALUES ('Workshop','/roleplaying/design/icons/workshop.gif'); INSERT buildingType (name,imgUrl) VALUES ('Warehouse','/roleplaying/design/icons/warehouse2.png');
table: buildingFloor
DROP TABLE IF EXISTS buildingFloor; CREATE TABLE buildingFloor ( id int(10) unsigned NOT NULL AUTO_INCREMENT, buildingId int(10) unsigned NOT NULL, floorNumber int(10) NULL, selectedFloorTemplateId int(10) unsigned NULL, name varchar(45) NULL, imgUrl varchar(100) NULL, description varchar(3000) NULL, PRIMARY KEY (id) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
table: floorNote
DROP TABLE IF EXISTS floorNote; CREATE TABLE floorNote ( id int(10) unsigned NOT NULL AUTO_INCREMENT, buildingFloorId int(10) unsigned NULL, height varchar(6) NULL, width varchar(6) NULL, name varchar(45) NULL, description varchar(3000) NULL, PRIMARY KEY (id) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
table: floorTemplate
DROP TABLE IF EXISTS floorTemplate; CREATE TABLE floorTemplate ( id int(10) unsigned NOT NULL AUTO_INCREMENT, name varchar(45) NULL, imgUrl varchar(100) NULL, PRIMARY KEY (id) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
table: floorTemplateMap
DROP TABLE IF EXISTS floorTemplateMap; CREATE TABLE floorTemplateMap ( id int(10) unsigned NOT NULL AUTO_INCREMENT, buildingDimensionId int(10) unsigned NOT NULL, buildingTypeId int(10) unsigned NOT NULL, floorTemplateId int(10) unsigned NOT NULL, PRIMARY KEY (id) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
table: road
DROP TABLE IF EXISTS road; CREATE TABLE road ( id int(10) unsigned NOT NULL AUTO_INCREMENT, name varchar(45) NOT NULL, PRIMARY KEY (id) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
table: corner
DROP TABLE IF EXISTS corner; CREATE TABLE corner ( id int(10) unsigned NOT NULL AUTO_INCREMENT, name varchar(45) NULL, PRIMARY KEY (id) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
table: cornerOf
DROP TABLE IF EXISTS cornerOf; CREATE TABLE cornerOf ( id int(10) unsigned NOT NULL AUTO_INCREMENT, cornerId int(10) unsigned NOT NULL, cityBlockId int(10) unsigned NOT NULL, PRIMARY KEY (id) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
table: cornerConnection
DROP TABLE IF EXISTS cornerConnection; CREATE TABLE cornerConnection ( id int(10) unsigned NOT NULL AUTO_INCREMENT, roadId int(10) unsigned NULL, corner1Id int(10) unsigned NOT NULL, corner2Id int(10) unsigned NOT NULL, squares int(10) unsigned NULL, PRIMARY KEY (id) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;