SET NAMES utf8;

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



CREATE TABLE IF NOT EXISTS `balises` (
  `balise_cle` int(11) NOT NULL AUTO_INCREMENT,
  `balise_texte` text COLLATE utf8_bin NOT NULL,
  PRIMARY KEY (`balise_cle`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

CREATE TABLE IF NOT EXISTS `cotexte` (
  `cot_cle` int(11) NOT NULL AUTO_INCREMENT COMMENT 'clé primaire',
  `manquant_cle` int(11) NOT NULL COMMENT 'clé secondaire : cle de l''index',
  `uta_cle` int(11) NOT NULL COMMENT 'clé de l''uta',
  `arti_cle` int(11) NOT NULL COMMENT 'clé de l''article',
  `uta_prem` int(11) NOT NULL,
  `uta_dern` int(11) NOT NULL,
  PRIMARY KEY (`cot_cle`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

CREATE TABLE IF NOT EXISTS `entite` (
  `entite_cle` int(11) NOT NULL AUTO_INCREMENT,
  `entite_chaine` varchar(45) COLLATE utf8_bin NOT NULL,
  PRIMARY KEY (`entite_cle`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='enitite des noms propres';

CREATE TABLE IF NOT EXISTS `fichiers` (
  `fich_cle` int(11) unsigned NOT NULL,
  `fich_nom` varchar(250) COLLATE utf8_bin NOT NULL,
  `fich_encodage` varchar(20) COLLATE utf8_bin NOT NULL,
  `fich_format` varchar(20) COLLATE utf8_bin NOT NULL,
  `fich_entete` text COLLATE utf8_bin NOT NULL,
  PRIMARY KEY (`fich_cle`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

CREATE TABLE IF NOT EXISTS `interpretation` (
  `interpretation_cle` int(11) NOT NULL AUTO_INCREMENT,
  `mqt_cle` int(11) NOT NULL,
  `date_insertion` datetime NOT NULL,
  `mqt_origine_cle` int(11) NOT NULL,
  `ordre_flexion` tinyint(3) NOT NULL,
  `modele_flexion` smallint(4) NOT NULL,
  `mqt_lemme_cle` int(11) NOT NULL,
  `ana_cle` smallint(4) NOT NULL,
  `langue_cle` smallint(4) NOT NULL,
  `dico_t_cle` smallint(4) NOT NULL,
  `aux_cle` tinyint(1) NOT NULL DEFAULT '0',
  `entite_cle` int(10) NOT NULL DEFAULT '0',
  `valide` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`interpretation_cle`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

CREATE TABLE IF NOT EXISTS `manquant` (
  `manquant_cle` int(11) NOT NULL,
  `manquant_chaine` varchar(250) COLLATE utf8_bin NOT NULL,
  `manquant_nb` int(10) NOT NULL,
  `manquant_etat_cle` tinyint(4) NOT NULL DEFAULT '0',
  `manquant_origine` tinyint(4) NOT NULL DEFAULT '0',
  `graphie_cle` int(10) NOT NULL DEFAULT '0',
  `rescor_cle` int(10) NOT NULL DEFAULT '0',
  `incor_cle` int(10) NOT NULL DEFAULT '0',
  `manquant_initial` varchar(4) COLLATE utf8_bin NOT NULL,
  `manquant_longueur` tinyint(4) NOT NULL,
  `manquant_valide` tinyint(1) NOT NULL,
  `manquant_mc` text COLLATE utf8_bin NOT NULL,
  PRIMARY KEY (`manquant_cle`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

CREATE TABLE IF NOT EXISTS `reecriture` (
  `reecriture_cle` int(11) NOT NULL AUTO_INCREMENT,
  `manquant_fautif` int(11) NOT NULL,
  `manquant_correct` int(11) DEFAULT NULL,
  `ordre` tinyint(4) DEFAULT NULL,
  PRIMARY KEY (`reecriture_cle`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_bin;




CREATE TABLE IF NOT EXISTS `uta` (
  `uta_cle` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uta_num` int(11) NOT NULL,
  `uta_num_mot` int(11) NOT NULL,
  `uta_t_cle` int(10) unsigned NOT NULL,
  `arti_cle` int(11) unsigned NOT NULL,
  `uta_chaine` varchar(255) COLLATE utf8_bin NOT NULL,
  `uta_chaine_lower` varchar(255) COLLATE utf8_bin  NOT NULL,
  `uta_ligne` int(11) NOT NULL,
  `uta_espace` int(11) NOT NULL,
  `uta_chaine_espace` varchar(20) COLLATE utf8_bin NOT NULL,
  `uta_partie` tinyint(4) NOT NULL DEFAULT '1',
  `uta_longueur` tinyint(4) NOT NULL,
  `uta_debut` char(1) COLLATE utf8_bin NOT NULL,
  `uta_debut_lower` char(4) COLLATE utf8_bin NOT NULL,
  `balise_cle_av` int(11) NOT NULL DEFAULT '0',
  `balise_cle_ap` int(11) NOT NULL DEFAULT '0',
  `graphie_cle` int(11) NOT NULL DEFAULT '0',
  `graphie_mc_type` tinyint(4) NOT NULL DEFAULT '0',
  `manquant_cle` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`uta_cle`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

CREATE TABLE IF NOT EXISTS `uta_analyse` (
  `uta_a_cle` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `uta_cle` int(11) NOT NULL,
  `dico_cle` int(11) DEFAULT NULL,
  `uta_a_etat` int(11) DEFAULT NULL,
  PRIMARY KEY (`uta_a_cle`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

CREATE TABLE IF NOT EXISTS `uta_type` (
  `uta_t_cle` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `uta_t_long` varchar(45) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`uta_t_cle`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;


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