-- http://www.phpmyadmin.net
-- 
-- Serveur: localhost
-- Généré le : Vendredi 06 Février 2009 à 16:47
-- Version du serveur: 5.0.27
-- Version de PHP: 5.2.0
-- 
-- Base de données: `vsg`
-- 

-- --------------------------------------------------------

-- 
-- Structure de la table `application_area`
-- 

CREATE TABLE `application_area` (
  `Number` int(10) unsigned NOT NULL,
  `Name` varchar(45) character set latin1 collate latin1_bin NOT NULL,
  PRIMARY KEY  (`Number`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- 
-- Contenu de la table `application_area`
-- 

INSERT INTO `application_area` (`Number`, `Name`) VALUES 
(1, 0x4f696c20616e6420476173),
(2, 0x4d6174657269616c7320736369656e6365);

-- --------------------------------------------------------

-- 
-- Structure de la table `application_area_o_event`
-- 

CREATE TABLE `application_area_o_event` (
  `application_area_number` int(10) unsigned NOT NULL,
  `event_number` int(10) unsigned NOT NULL,
  PRIMARY KEY  (`application_area_number`,`event_number`),
  KEY `event_number` (`event_number`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- 
-- Contenu de la table `application_area_o_event`
-- 

INSERT INTO `application_area_o_event` (`application_area_number`, `event_number`) VALUES 
(1, 1),
(2, 1),
(2, 2);

-- --------------------------------------------------------

-- 
-- Structure de la table `country`
-- 

CREATE TABLE `country` (
  `Number` int(10) unsigned NOT NULL,
  `Name` varchar(45) character set latin1 collate latin1_bin NOT NULL,
  PRIMARY KEY  (`Number`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- 
-- Contenu de la table `country`
-- 

INSERT INTO `country` (`Number`, `Name`) VALUES 
(1, 0x555341),
(2, 0x556e69746564204b696e67646f6d),
(3, 0x4672616e6365);

-- --------------------------------------------------------

-- 
-- Structure de la table `date`
-- 

CREATE TABLE `date` (
  `Date` date NOT NULL,
  `ampm` varchar(2) character set latin1 collate latin1_bin NOT NULL,
  `start_time` time NOT NULL,
  `end_time` time NOT NULL,
  `Number` int(10) unsigned NOT NULL auto_increment,
  PRIMARY KEY  (`Number`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;

-- 
-- Contenu de la table `date`
-- 

INSERT INTO `date` (`Date`, `ampm`, `start_time`, `end_time`, `Number`) VALUES 
('2009-01-15', 0x616d, '08:30:00', '12:00:00', 1),
('2009-01-15', 0x706d, '14:00:00', '17:30:00', 2),
('2009-02-20', 0x616d, '09:00:00', '11:30:00', 3),
('2009-02-20', 0x706d, '13:00:00', '17:30:00', 4);

-- --------------------------------------------------------

-- 
-- Structure de la table `date_o_event`
-- 

CREATE TABLE `date_o_event` (
  `date_number` int(10) unsigned NOT NULL,
  `event_number` int(10) unsigned NOT NULL,
  PRIMARY KEY  (`date_number`,`event_number`),
  KEY `event_number` (`event_number`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- 
-- Contenu de la table `date_o_event`
-- 

INSERT INTO `date_o_event` (`date_number`, `event_number`) VALUES 
(1, 1),
(2, 1),
(3, 2),
(4, 2);

-- --------------------------------------------------------

-- 
-- Structure de la table `event`
-- 

CREATE TABLE `event` (
  `Number` int(10) unsigned NOT NULL,
  `request_date` datetime NOT NULL,
  `request_status` varchar(45) character set latin1 collate latin1_bin NOT NULL,
  `Name` varchar(45) character set latin1 collate latin1_bin NOT NULL,
  `City` varchar(45) character set latin1 collate latin1_bin NOT NULL,
  `coorganizer_Name` varchar(45) character set latin1 collate latin1_bin NOT NULL,
  `contact1_Name` varchar(45) character set latin1 collate latin1_bin NOT NULL,
  `contact1_Tel` varchar(45) character set latin1 collate latin1_bin NOT NULL,
  `contact2_Name` varchar(45) character set latin1 collate latin1_bin NOT NULL,
  `contact2_Tel` varchar(45) character set latin1 collate latin1_bin NOT NULL,
  `website` varchar(45) character set latin1 collate latin1_bin NOT NULL,
  `url_image` varchar(45) character set latin1 collate latin1_bin NOT NULL,
  `Description` varchar(1500) character set latin1 collate latin1_bin NOT NULL,
  `marcom_comment` varchar(1500) character set latin1 collate latin1_bin NOT NULL,
  `draft` tinyint(1) NOT NULL,
  `country_number` int(10) unsigned NOT NULL,
  `type_event_number` int(10) unsigned NOT NULL,
  `marcom_user_mail` varchar(100) character set latin1 collate latin1_bin NOT NULL,
  PRIMARY KEY  (`Number`),
  KEY `country_number` (`country_number`),
  KEY `type_event_number` (`type_event_number`),
  KEY `marcom_user_mail` (`marcom_user_mail`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- 
-- Contenu de la table `event`
-- 

INSERT INTO `event` (`Number`, `request_date`, `request_status`, `Name`, `City`, `coorganizer_Name`, `contact1_Name`, `contact1_Tel`, `contact2_Name`, `contact2_Tel`, `website`, `url_image`, `Description`, `marcom_comment`, `draft`, `country_number`, `type_event_number`, `marcom_user_mail`) VALUES 
(1, '2009-01-06 15:58:32', 0x56616c696461746564, 0x53656d696e6169726520646520746573742031, 0x486f6e6f6c756c75, 0x426f622044796c616e, 0x426f626279, 0x31333538343638343531, '', '', 0x687474703a2f2f676f6f676c652e6672, 0x687474703a2f2f336476697a2e6d632e636f6d2f696d616765732f676c6f62616c2f6c6f676f5f6d63735f7673, 0x4465736372697074696f6e2064752073656d696e616972652064652074657374203120, '', 0, 1, 2, 0x6268656e64657273406d632e636f6d),
(2, '2008-12-04 16:21:14', 0x72656a6563746564, 0x547261646573686f772064652074657374, 0x5061726973, 0x5061747269636b204d6963686174726f7570, 0x5061746f75, 0x323332353536, 0x506963736f75, 0x3738353632323335, 0x687474703a2f2f70657264752e636f6d, 0x687474703a2f2f7777772e6d6977696d2e66722f626c6f672f726573736f75726365732f476f6f676c65312e6a, 0x4465736372697074696f6e20647520747261646573686f77, 0x636f6d6d656e7461697265206465206d6172636f6d, 0, 3, 1, 0x6b6d6f6f7265406d632e636f6d);

-- --------------------------------------------------------

-- 
-- Structure de la table `marcom_user`
-- 

CREATE TABLE `marcom_user` (
  `Mail` varchar(100) character set latin1 collate latin1_bin NOT NULL,
  `Name` varchar(45) character set latin1 collate latin1_bin NOT NULL,
  `service_number` int(10) NOT NULL,
  PRIMARY KEY  (`Mail`),
  KEY `service_number` (`service_number`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- 
-- Contenu de la table `marcom_user`
-- 

INSERT INTO `marcom_user` (`Mail`, `Name`, `service_number`) VALUES 
(0x6268656e64657273406d632e636f6d, 0x42696c6c2068656e646572736f6e, 2),
(0x6567616c6c6f6973406d632e636f6d, 0x456d696c69652047616c6c6f6973, 1),
(0x6a5068696c6c697073406d632e636f6d, 0x4a61736f6e205068696c6c697073, 2),
(0x6b6d6f6f7265406d632e636f6d, 0x4b656e204d6f6f7265, 2),
(0x6c62696c6c79406d632e636f6d, 0x4c617572656e742042696c6c79, 1);

-- --------------------------------------------------------

-- 
-- Structure de la table `material`
-- 

CREATE TABLE `material` (
  `id` varchar(150) character set latin1 collate latin1_bin NOT NULL,
  `path` varchar(100) character set latin1 collate latin1_bin NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- 
-- Contenu de la table `material`
-- 

INSERT INTO `material` (`id`, `path`) VALUES 
(0x4d6174657269616c20303031, 0x6e6f6e65207368616c6c2070617468);

-- --------------------------------------------------------

-- 
-- Structure de la table `material_o_event`
-- 

CREATE TABLE `material_o_event` (
  `event_number` int(10) unsigned NOT NULL,
  `material_id` varchar(150) character set latin1 collate latin1_bin NOT NULL,
  PRIMARY KEY  (`material_id`,`event_number`),
  KEY `event_number` (`event_number`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- 
-- Contenu de la table `material_o_event`
-- 

INSERT INTO `material_o_event` (`event_number`, `material_id`) VALUES 
(1, 0x4d6174657269616c20303031);

-- --------------------------------------------------------

-- 
-- Structure de la table `product`
-- 

CREATE TABLE `product` (
  `Number` int(10) unsigned NOT NULL,
  `Name` varchar(45) character set latin1 collate latin1_bin NOT NULL,
  PRIMARY KEY  (`Number`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- 
-- Contenu de la table `product`
-- 

INSERT INTO `product` (`Number`, `Name`) VALUES 
(1, 0x4176697a6f),
(2, 0x4f70656e20496e76656e746f72),
(3, 0x4f70656e20525454),
(4, 0x5061746368776f726b3344),
(5, 0x4f74686572);

-- --------------------------------------------------------

-- 
-- Structure de la table `product_o_event`
-- 

CREATE TABLE `product_o_event` (
  `product_number` int(10) unsigned NOT NULL,
  `event_number` int(10) unsigned NOT NULL,
  PRIMARY KEY  (`product_number`,`event_number`),
  KEY `event_number` (`event_number`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- 
-- Contenu de la table `product_o_event`
-- 

INSERT INTO `product_o_event` (`product_number`, `event_number`) VALUES 
(1, 1),
(3, 1),
(2, 2),
(4, 2),
(5, 2);

-- --------------------------------------------------------

-- 
-- Structure de la table `registrant`
-- 

CREATE TABLE `registrant` (
  `Mail` varchar(100) character set latin1 collate latin1_bin NOT NULL,
  `LastName` varchar(45) character set latin1 collate latin1_bin NOT NULL,
  `FirstName` varchar(45) character set latin1 collate latin1_bin NOT NULL,
  `OrganizationName` varchar(45) character set latin1 collate latin1_bin NOT NULL,
  `Adress1` varchar(45) character set latin1 collate latin1_bin NOT NULL,
  `Adress2` varchar(45) character set latin1 collate latin1_bin NOT NULL,
  `City` varchar(45) character set latin1 collate latin1_bin NOT NULL,
  `PostCode` varchar(45) character set latin1 collate latin1_bin NOT NULL,
  `Country` varchar(45) character set latin1 collate latin1_bin NOT NULL,
  `State` varchar(45) character set latin1 collate latin1_bin NOT NULL,
  `Phone` varchar(13) character set latin1 collate latin1_bin NOT NULL,
  `News` tinyint(1) NOT NULL,
  PRIMARY KEY  (`Mail`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- 
-- Contenu de la table `registrant`
-- 

INSERT INTO `registrant` (`Mail`, `LastName`, `FirstName`, `OrganizationName`, `Adress1`, `Adress2`, `City`, `PostCode`, `Country`, `State`, `Phone`, `News`) VALUES 
(0x67636c656d7340676d61696c2e636f6d, 0x477269686f6e, 0x436c656d656e74, 0x6d6373, 0x313420496d70617373652053616c65, '', 0x426f726465617578, 0x3333383030, 0x4672616e6365, '', 0x35353533333236353839, 0),
(0x6e736368656c6c406d632e636f6d, 0x536368656c6c, 0x4e69636f6c6173, 0x6d6373206175737369, 0x56657273206c6120766963746f697265, '', 0x426f726465617578, 0x3333383030, 0x4672616e6365, '', 0x35333333323135, 1);

-- --------------------------------------------------------

-- 
-- Structure de la table `registrant_o_event`
-- 

CREATE TABLE `registrant_o_event` (
  `registrant_mail` varchar(100) character set latin1 collate latin1_bin NOT NULL,
  `event_number` int(10) unsigned NOT NULL,
  PRIMARY KEY  (`event_number`,`registrant_mail`),
  KEY `registrant_mail` (`registrant_mail`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- 
-- Contenu de la table `registrant_o_event`
-- 

INSERT INTO `registrant_o_event` (`registrant_mail`, `event_number`) VALUES 
(0x67636c656d7340676d61696c2e636f6d, 1),
(0x6e736368656c6c406d632e636f6d, 1);

-- --------------------------------------------------------

-- 
-- Structure de la table `service`
-- 

CREATE TABLE `service` (
  `Number` int(10) NOT NULL,
  `Label` varchar(45) character set latin1 collate latin1_bin NOT NULL,
  PRIMARY KEY  (`Number`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- 
-- Contenu de la table `service`
-- 

INSERT INTO `service` (`Number`, `Label`) VALUES 
(1, 0x4d6172636f6d),
(2, 0x53616c6573);

-- --------------------------------------------------------

-- 
-- Structure de la table `type_event`
-- 

CREATE TABLE `type_event` (
  `Number` int(10) unsigned NOT NULL,
  `Name` varchar(45) character set latin1 collate latin1_bin NOT NULL,
  `Abbreviation` varchar(2) character set latin1 collate latin1_bin NOT NULL,
  PRIMARY KEY  (`Number`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- 
-- Contenu de la table `type_event`
-- 

INSERT INTO `type_event` (`Number`, `Name`, `Abbreviation`) VALUES 
(1, 0x547261646573686f77, 0x5453),
(2, 0x53656d696e6172, 0x5345),
(3, 0x576562696e6172, 0x5745),
(4, 0x5573657220747261696e696e67, 0x5554);

-- 
-- Contraintes pour les tables exportées
-- 

-- 
-- Contraintes pour la table `application_area_o_event`
-- 
ALTER TABLE `application_area_o_event`
  ADD CONSTRAINT `application_area_o_event_ibfk_2` FOREIGN KEY (`application_area_number`) REFERENCES `application_area` (`Number`),
  ADD CONSTRAINT `application_area_o_event_ibfk_1` FOREIGN KEY (`event_number`) REFERENCES `event` (`Number`);

-- 
-- Contraintes pour la table `date_o_event`
-- 
ALTER TABLE `date_o_event`
  ADD CONSTRAINT `date_o_event_ibfk_1` FOREIGN KEY (`date_number`) REFERENCES `date` (`Number`),
  ADD CONSTRAINT `date_o_event_ibfk_2` FOREIGN KEY (`event_number`) REFERENCES `event` (`Number`);

-- 
-- Contraintes pour la table `event`
-- 
ALTER TABLE `event`
  ADD CONSTRAINT `event_ibfk_4` FOREIGN KEY (`marcom_user_mail`) REFERENCES `marcom_user` (`Mail`),
  ADD CONSTRAINT `event_ibfk_2` FOREIGN KEY (`country_number`) REFERENCES `country` (`Number`),
  ADD CONSTRAINT `event_ibfk_3` FOREIGN KEY (`type_event_number`) REFERENCES `type_event` (`Number`);

-- 
-- Contraintes pour la table `marcom_user`
-- 
ALTER TABLE `marcom_user`
  ADD CONSTRAINT `marcom_user_ibfk_1` FOREIGN KEY (`service_number`) REFERENCES `service` (`Number`);

-- 
-- Contraintes pour la table `material_o_event`
-- 
ALTER TABLE `material_o_event`
  ADD CONSTRAINT `material_o_event_ibfk_1` FOREIGN KEY (`event_number`) REFERENCES `event` (`Number`),
  ADD CONSTRAINT `material_o_event_ibfk_2` FOREIGN KEY (`material_id`) REFERENCES `material` (`id`);

-- 
-- Contraintes pour la table `product_o_event`
-- 
ALTER TABLE `product_o_event`
  ADD CONSTRAINT `product_o_event_ibfk_1` FOREIGN KEY (`product_number`) REFERENCES `product` (`Number`),
  ADD CONSTRAINT `product_o_event_ibfk_2` FOREIGN KEY (`event_number`) REFERENCES `event` (`Number`);

-- 
-- Contraintes pour la table `registrant_o_event`
-- 
ALTER TABLE `registrant_o_event`
  ADD CONSTRAINT `registrant_o_event_ibfk_2` FOREIGN KEY (`event_number`) REFERENCES `event` (`Number`),
  ADD CONSTRAINT `registrant_o_event_ibfk_1` FOREIGN KEY (`registrant_mail`) REFERENCES `registrant` (`Mail`);