-- MySQL Administrator dump 1.4
--
-- ------------------------------------------------------
-- Server version	5.0.51b-community-nt


/*!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 thomas
--

CREATE DATABASE IF NOT EXISTS thomas;
USE thomas;

--
-- Definition of table `entity`
--

DROP TABLE IF EXISTS `entity`;
CREATE TABLE `entity` (
  `ID` int(10) unsigned NOT NULL auto_increment,
  `EntityID` varchar(45) NOT NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=105 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `entity`
--

/*!40000 ALTER TABLE `entity` DISABLE KEYS */;
INSERT INTO `entity` (`ID`,`EntityID`) VALUES 
 (4,'entity');
/*!40000 ALTER TABLE `entity` ENABLE KEYS */;


--
-- Definition of table `entityplaylist`
--

DROP TABLE IF EXISTS `entityplaylist`;
CREATE TABLE `entityplaylist` (
  `Role` int(10) unsigned NOT NULL,
  `Unit` int(10) unsigned NOT NULL,
  `Entity` int(10) unsigned NOT NULL,
  PRIMARY KEY  (`Role`,`Unit`,`Entity`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `entityplaylist`
--

/*!40000 ALTER TABLE `entityplaylist` DISABLE KEYS */;
/*!40000 ALTER TABLE `entityplaylist` ENABLE KEYS */;


--
-- Definition of table `norm`
--

DROP TABLE IF EXISTS `norm`;
CREATE TABLE `norm` (
  `ID` int(10) unsigned NOT NULL auto_increment,
  `NormID` varchar(45) NOT NULL,
  `AddressedRole` int(10) unsigned NOT NULL,
  `IssuerRole` int(10) unsigned default NULL,
  `DefenderRole` int(10) unsigned default NULL,
  `PromoterRole` int(10) unsigned default NULL,
  `DeinticConcept` varchar(45) NOT NULL,
  `Action` varchar(45) NOT NULL,
  `Service` int(10) unsigned NOT NULL,
  `StateCondition` varchar(45) default NULL,
  `TemporalCondition` varchar(45) default NULL,
  `SanctionNorm` int(10) unsigned default NULL,
  `RewardNorm` int(10) unsigned default NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `norm`
--

/*!40000 ALTER TABLE `norm` DISABLE KEYS */;
/*!40000 ALTER TABLE `norm` ENABLE KEYS */;


--
-- Definition of table `role`
--

DROP TABLE IF EXISTS `role`;
CREATE TABLE `role` (
  `ID` int(10) unsigned NOT NULL auto_increment,
  `RoleID` varchar(45) NOT NULL,
  `Position` varchar(45) NOT NULL,
  `Accessibility` varchar(45) NOT NULL,
  `Visibility` varchar(45) NOT NULL,
  `Inheritance` int(10) unsigned NOT NULL,
  `Unit` int(10) unsigned NOT NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `role`
--

/*!40000 ALTER TABLE `role` DISABLE KEYS */;
INSERT INTO `role` (`ID`,`RoleID`,`Position`,`Accessibility`,`Visibility`,`Inheritance`,`Unit`) VALUES 
 (1,'member','member','external','public',0,1);
/*!40000 ALTER TABLE `role` ENABLE KEYS */;


--
-- Definition of table `unit`
--

DROP TABLE IF EXISTS `unit`;
CREATE TABLE `unit` (
  `ID` int(10) unsigned NOT NULL auto_increment,
  `UnitID` varchar(45) NOT NULL,
  `ParentUnit` int(10) unsigned default NULL,
  `Type` varchar(45) NOT NULL,
  `Goal` varchar(45) NOT NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `unit`
--

/*!40000 ALTER TABLE `unit` DISABLE KEYS */;
INSERT INTO `unit` (`ID`,`UnitID`,`ParentUnit`,`Type`,`Goal`) VALUES 
 (1,'virtual',0,'flat','\"\"');
/*!40000 ALTER TABLE `unit` ENABLE KEYS */;




/*!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 */;
