/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;


--
-- Create schema `COMPLEX`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `COMPLEX`;
USE `COMPLEX`;
CREATE TABLE `K1_0D-properties` (
  `cell` int(11) NOT NULL default '0',
  `x` double default NULL,
  `y` double default NULL,
  PRIMARY KEY  (`cell`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
INSERT INTO `K1_0D-properties` VALUES  (40,4,0),
 (41,5.5,0),
 (42,10.5,0),
 (43,0,1.5),
 (44,3,1.5),
 (45,4,1.5),
 (46,0,2.5),
 (47,3,2.5),
 (48,4,3),
 (49,5.5,3),
 (50,10.5,3),
 (51,0,6),
 (52,4,6),
 (53,10.5,6);
CREATE TABLE `K1_2D-properties` (
  `cell` int(11) NOT NULL default '0',
  `description` text,
  `size` double default NULL,
  PRIMARY KEY  (`cell`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
INSERT INTO `K1_2D-properties` VALUES  (1,'Flur',5.75),
 (2,'Bad',4),
 (3,'Küche',13.75),
 (4,'Wohnzimmer',19.5),
 (5,'Schlafzimmer',15);
CREATE TABLE `K1_boundary` (
  `ID` int(11) NOT NULL default '0',
  `cell1` int(11) default NULL,
  `cell2` int(11) default NULL,
  `value` smallint(6) default NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
INSERT INTO `K1_boundary` VALUES  (21,1,10,1),
 (22,1,13,1),
 (23,1,15,-1),
 (24,1,22,-1),
 (25,1,24,1),
 (26,1,30,-1),
 (27,2,12,1),
 (28,2,14,-1),
 (29,2,20,-1),
 (30,2,22,1),
 (31,3,14,1),
 (32,3,17,-1),
 (33,3,21,-1),
 (34,3,23,1),
 (35,3,30,1),
 (36,4,15,1),
 (37,4,18,-1),
 (38,4,23,-1),
 (39,4,26,1),
 (40,5,11,1),
 (41,5,16,-1),
 (42,5,24,-1),
 (43,5,25,1),
 (44,10,40,-1),
 (45,10,41,1),
 (46,11,41,-1),
 (47,11,42,1),
 (48,12,43,-1),
 (49,12,44,1),
 (50,13,44,-1),
 (51,13,45,1),
 (52,14,46,-1),
 (53,14,47,1),
 (54,15,48,-1),
 (55,15,49,1),
 (56,16,49,-1),
 (57,16,50,1),
 (58,17,51,-1),
 (59,17,52,1),
 (60,18,52,-1),
 (61,18,53,1),
 (62,20,43,-1),
 (63,20,46,1),
 (64,21,46,-1),
 (65,21,51,1),
 (66,22,44,-1),
 (67,22,47,1),
 (68,23,48,-1),
 (69,23,52,1),
 (70,24,41,-1),
 (71,24,49,1),
 (72,25,42,-1),
 (73,25,50,1),
 (74,26,50,-1),
 (75,26,53,1),
 (76,30,47,-1),
 (77,30,48,1),
 (78,19,40,-1),
 (79,19,45,1),
 (80,1,19,-1),
 (81,4,16,1);
CREATE TABLE `K1_cells` (
  `cell` int(11) NOT NULL default '0',
  `dim` int(11) default NULL,
  PRIMARY KEY  (`cell`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
INSERT INTO `K1_cells` VALUES  (1,2),
 (2,2),
 (3,2),
 (4,2),
 (5,2),
 (10,1),
 (11,1),
 (12,1),
 (13,1),
 (14,1),
 (15,1),
 (16,1),
 (17,1),
 (18,1),
 (19,1),
 (20,1),
 (21,1),
 (22,1),
 (23,1),
 (24,1),
 (25,1),
 (26,1),
 (30,1),
 (40,0),
 (41,0),
 (42,0),
 (43,0),
 (44,0),
 (45,0),
 (46,0),
 (47,0),
 (48,0),
 (49,0),
 (50,0),
 (51,0),
 (52,0),
 (53,0);
CREATE TABLE `K2_0D-properties` (
  `cell` int(11) NOT NULL default '0',
  `x` double default NULL,
  `y` double default NULL,
  `z` double default NULL,
  PRIMARY KEY  (`cell`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
INSERT INTO `K2_0D-properties` VALUES  (1,1,0,0),
 (2,0,1,0),
 (3,0,0,1),
 (4,1,1,1);
CREATE TABLE `K2_boundary` (
  `ID` int(11) NOT NULL default '0',
  `cell1` int(11) default NULL,
  `cell2` int(11) default NULL,
  `value` smallint(6) default NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
INSERT INTO `K2_boundary` VALUES  (1,5,1,1),
 (2,5,2,-1),
 (13,11,5,-1),
 (14,11,7,1),
 (15,11,9,-1),
 (16,12,5,1),
 (17,12,8,-1),
 (18,12,10,1),
 (19,13,6,1),
 (20,13,7,1),
 (21,13,8,-1),
 (22,14,6,-1),
 (23,14,9,-1),
 (24,14,10,1),
 (25,15,11,1),
 (26,15,12,1),
 (27,15,13,-1),
 (28,15,14,-1),
 (3,6,4,-1),
 (4,6,3,1),
 (5,7,1,1),
 (6,7,3,-1),
 (7,8,1,1),
 (8,8,4,-1),
 (9,9,2,1),
 (10,9,3,-1),
 (11,10,2,1),
 (12,10,4,-1);
CREATE TABLE `K2_cells` (
  `cell` int(11) NOT NULL default '0',
  `dim` int(11) default NULL,
  PRIMARY KEY  (`cell`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
INSERT INTO `K2_cells` VALUES  (1,0),
 (2,0),
 (3,0),
 (4,0),
 (5,1),
 (6,1),
 (7,1),
 (8,1),
 (9,1),
 (10,1),
 (11,2),
 (12,2),
 (13,2),
 (14,2),
 (15,3);
CREATE TABLE `complexes` (
  `ID` int(11) unsigned NOT NULL default '0',
  `name` char(20) default NULL,
  `dim` int(11) unsigned default NULL,
  PRIMARY KEY  (`ID`),
  UNIQUE KEY `ID` (`ID`),
  KEY `ID_2` (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
INSERT INTO `complexes` VALUES  (1,'Grundriss',2),
 (2,'Tetraeder',3);
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
