-- MySQL dump 10.8
--
-- Host: localhost    Database: benchmark
-- ------------------------------------------------------
-- Server version	4.1.7-standard-log

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

--
-- Table structure for table `blocked`
--

DROP TABLE IF EXISTS `blocked`;
CREATE TABLE `blocked` (
  `id` int(11) NOT NULL default '0',
  `src` int(11) NOT NULL default '0',
  `trg` int(11) NOT NULL default '0',
  PRIMARY KEY  (`id`),
  KEY `blocked_src_trg` (`src`,`trg`),
  KEY `blocked_trg_src` (`trg`,`src`),
  CONSTRAINT `blocked_obj` FOREIGN KEY (`id`) REFERENCES `object` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `blocked_src` FOREIGN KEY (`src`) REFERENCES `resource` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `blocked_trg` FOREIGN KEY (`trg`) REFERENCES `process` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `blocked`
--


/*!40000 ALTER TABLE `blocked` DISABLE KEYS */;
LOCK TABLES `blocked` WRITE;
UNLOCK TABLES;
/*!40000 ALTER TABLE `blocked` ENABLE KEYS */;

--
-- Table structure for table `held_by`
--

DROP TABLE IF EXISTS `held_by`;
CREATE TABLE `held_by` (
  `id` int(11) NOT NULL default '0',
  `src` int(11) NOT NULL default '0',
  `trg` int(11) NOT NULL default '0',
  PRIMARY KEY  (`id`),
  KEY `held_by_src_trg` (`src`,`trg`),
  KEY `held_by_trg_src` (`trg`,`src`),
  CONSTRAINT `held_by_obj` FOREIGN KEY (`id`) REFERENCES `object` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `held_by_src` FOREIGN KEY (`src`) REFERENCES `resource` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `held_by_trg` FOREIGN KEY (`trg`) REFERENCES `process` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `held_by`
--


/*!40000 ALTER TABLE `held_by` DISABLE KEYS */;
LOCK TABLES `held_by` WRITE;
UNLOCK TABLES;
/*!40000 ALTER TABLE `held_by` ENABLE KEYS */;

--
-- Table structure for table `next`
--

DROP TABLE IF EXISTS `next`;
CREATE TABLE `next` (
  `id` int(11) NOT NULL default '0',
  `src` int(11) NOT NULL default '0',
  `trg` int(11) NOT NULL default '0',
  PRIMARY KEY  (`id`),
  KEY `next_src_trg` (`src`,`trg`),
  KEY `next_trg_src` (`trg`,`src`),
  CONSTRAINT `next_obj` FOREIGN KEY (`id`) REFERENCES `object` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `next_src` FOREIGN KEY (`src`) REFERENCES `process` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `next_trg` FOREIGN KEY (`trg`) REFERENCES `process` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `next`
--


/*!40000 ALTER TABLE `next` DISABLE KEYS */;
LOCK TABLES `next` WRITE;
UNLOCK TABLES;
/*!40000 ALTER TABLE `next` ENABLE KEYS */;

--
-- Table structure for table `object`
--

DROP TABLE IF EXISTS `object`;
CREATE TABLE `object` (
  `id` int(11) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `object`
--


/*!40000 ALTER TABLE `object` DISABLE KEYS */;
LOCK TABLES `object` WRITE;
UNLOCK TABLES;
/*!40000 ALTER TABLE `object` ENABLE KEYS */;

--
-- Table structure for table `process`
--

DROP TABLE IF EXISTS `process`;
CREATE TABLE `process` (
  `id` int(11) NOT NULL default '0',
  PRIMARY KEY  (`id`),
  CONSTRAINT `process_object` FOREIGN KEY (`id`) REFERENCES `object` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `process`
--


/*!40000 ALTER TABLE `process` DISABLE KEYS */;
LOCK TABLES `process` WRITE;
UNLOCK TABLES;
/*!40000 ALTER TABLE `process` ENABLE KEYS */;

--
-- Table structure for table `release`
--

DROP TABLE IF EXISTS `release`;
CREATE TABLE `release` (
  `id` int(11) NOT NULL default '0',
  `src` int(11) NOT NULL default '0',
  `trg` int(11) NOT NULL default '0',
  PRIMARY KEY  (`id`),
  KEY `release_src_trg` (`src`,`trg`),
  KEY `release_trg_src` (`trg`,`src`),
  CONSTRAINT `release_obj` FOREIGN KEY (`id`) REFERENCES `object` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `release_src` FOREIGN KEY (`src`) REFERENCES `resource` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `release_trg` FOREIGN KEY (`trg`) REFERENCES `process` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `release`
--


/*!40000 ALTER TABLE `release` DISABLE KEYS */;
LOCK TABLES `release` WRITE;
UNLOCK TABLES;
/*!40000 ALTER TABLE `release` ENABLE KEYS */;

--
-- Table structure for table `request`
--

DROP TABLE IF EXISTS `request`;
CREATE TABLE `request` (
  `id` int(11) NOT NULL default '0',
  `src` int(11) NOT NULL default '0',
  `trg` int(11) NOT NULL default '0',
  PRIMARY KEY  (`id`),
  KEY `request_src_trg` (`src`,`trg`),
  KEY `request_trg_src` (`trg`,`src`),
  CONSTRAINT `request_obj` FOREIGN KEY (`id`) REFERENCES `object` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `request_src` FOREIGN KEY (`src`) REFERENCES `process` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `request_trg` FOREIGN KEY (`trg`) REFERENCES `resource` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `request`
--


/*!40000 ALTER TABLE `request` DISABLE KEYS */;
LOCK TABLES `request` WRITE;
UNLOCK TABLES;
/*!40000 ALTER TABLE `request` ENABLE KEYS */;

--
-- Table structure for table `resource`
--

DROP TABLE IF EXISTS `resource`;
CREATE TABLE `resource` (
  `id` int(11) NOT NULL default '0',
  PRIMARY KEY  (`id`),
  CONSTRAINT `resource_object` FOREIGN KEY (`id`) REFERENCES `object` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `resource`
--


/*!40000 ALTER TABLE `resource` DISABLE KEYS */;
LOCK TABLES `resource` WRITE;
UNLOCK TABLES;
/*!40000 ALTER TABLE `resource` ENABLE KEYS */;

--
-- Table structure for table `token`
--

DROP TABLE IF EXISTS `token`;
CREATE TABLE `token` (
  `id` int(11) NOT NULL default '0',
  `src` int(11) NOT NULL default '0',
  `trg` int(11) NOT NULL default '0',
  PRIMARY KEY  (`id`),
  KEY `token_src_trg` (`src`,`trg`),
  KEY `token_trg_src` (`trg`,`src`),
  CONSTRAINT `token_obj` FOREIGN KEY (`id`) REFERENCES `object` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `token_src` FOREIGN KEY (`src`) REFERENCES `resource` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `token_trg` FOREIGN KEY (`trg`) REFERENCES `process` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `token`
--


/*!40000 ALTER TABLE `token` DISABLE KEYS */;
LOCK TABLES `token` WRITE;
UNLOCK TABLES;
/*!40000 ALTER TABLE `token` 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 */;

