-- phpMyAdmin SQL Dump
-- version 2.10.0.2
-- http://www.phpmyadmin.net
-- 
-- Serveur: localhost
-- Généré le : Jeu 08 Novembre 2007 à 15:35
-- Version du serveur: 5.0.27
-- Version de PHP: 4.4.4

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

-- 
-- Base de données: 'akengro_voyage'
-- 

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

-- 
-- Structure de la table 'adherent'
-- 

DROP TABLE IF EXISTS adherent;
CREATE TABLE adherent (
  numa int(5) NOT NULL,
  noma varchar(32) NOT NULL,
  prenoma varchar(32) NOT NULL,
  villea varchar(32) NOT NULL,
  cota tinyint(1) NOT NULL,
  PRIMARY KEY  (numa)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;


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

-- 
-- Structure de la table 'depart'
-- 

DROP TABLE IF EXISTS depart;
CREATE TABLE depart (
  refv int(3) NOT NULL default '0',
  datedep date NOT NULL default '0000-00-00',
  PRIMARY KEY  (refv,datedep)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;


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

-- 
-- Structure de la table 'reservation'
-- 

DROP TABLE IF EXISTS reservation;
CREATE TABLE reservation (
  ndossier int(5) NOT NULL,
  numa int(5) default NULL,
  refv int(3) default NULL,
  datedep date default NULL,
  acompte decimal(8,2) default NULL,
  PRIMARY KEY  (ndossier)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;


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

-- 
-- Structure de la table 'voyage'
-- 

DROP TABLE IF EXISTS voyage;
CREATE TABLE voyage (
  refv int(3) NOT NULL,
  destv varchar(32) NOT NULL,
  dureev int(1) NOT NULL,
  coutv decimal(8,2) NOT NULL,
  typev varchar(2) NOT NULL,
  PRIMARY KEY  (refv)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

-- 
-- Contraintes pour la table `reservation`
-- 
ALTER TABLE `reservation`
  ADD CONSTRAINT reservation_ibfk_1 FOREIGN KEY (refv, datedep) REFERENCES depart (refv, datedep);
ALTER TABLE `reservation`
  ADD CONSTRAINT reservation_ibfk_2 FOREIGN KEY (numa) REFERENCES adherent(numa);

-- 
-- Contraintes pour la table `depart`
-- 

ALTER TABLE `depart`
  ADD CONSTRAINT depart_ibfk_1 FOREIGN KEY (refv) REFERENCES voyage (refv);

-- 
-- Contenu de la table 'adherent'
-- 

INSERT INTO adherent (numa, noma, prenoma, villea, cota) VALUES (90105, 'ROUL', 'LOUIS', 'VERSAILLES', 1);
INSERT INTO adherent (numa, noma, prenoma, villea, cota) VALUES (90121, 'BERTRE', 'FRANCINE', 'MARSEILLE', 1);
INSERT INTO adherent (numa, noma, prenoma, villea, cota) VALUES (90122, 'ALPHON', 'PHILIPPE', 'VERSAILLES', 1);
INSERT INTO adherent (numa, noma, prenoma, villea, cota) VALUES (92008, 'LAURE', 'ARMELLE', 'PARIS', 1);
INSERT INTO adherent (numa, noma, prenoma, villea, cota) VALUES (92450, 'STANIS', 'HENRI', 'VERSAILLES', 0);
INSERT INTO adherent (numa, noma, prenoma, villea, cota) VALUES (93001, 'MARUS', 'HUBERT', 'ANGOULEME', 0);
INSERT INTO adherent (numa, noma, prenoma, villea, cota) VALUES (93005, 'JACOB', 'ROBERT', 'NICE', 1);
INSERT INTO adherent (numa, noma, prenoma, villea, cota) VALUES (93500, 'FRANC', 'BERTRAND', 'NICE', 1);
INSERT INTO adherent (numa, noma, prenoma, villea, cota) VALUES (93807, 'DONA', 'ERNEST', 'PARIS', 1);
INSERT INTO adherent (numa, noma, prenoma, villea, cota) VALUES (94100, 'MOULINET', 'PAUL', 'NICE', 1);
INSERT INTO adherent (numa, noma, prenoma, villea, cota) VALUES (94202, 'NATUREST', 'PATRICK', 'BREST', 1);
INSERT INTO adherent (numa, noma, prenoma, villea, cota) VALUES (94500, 'CANETRO', 'MARC', 'BREST', 0);
INSERT INTO adherent (numa, noma, prenoma, villea, cota) VALUES (95077, 'MADEL', 'JULIE', 'VERSAILLES', 1);
INSERT INTO adherent (numa, noma, prenoma, villea, cota) VALUES (96010, 'CAMI', 'IGOR', 'PARIS', 1);
INSERT INTO adherent (numa, noma, prenoma, villea, cota) VALUES (96101, 'BOULVO', 'HUBERT', 'GRENOBLE', 1);
INSERT INTO adherent (numa, noma, prenoma, villea, cota) VALUES (96102, 'SIDON', 'LOIC', 'AMIENS', 1);
INSERT INTO adherent (numa, noma, prenoma, villea, cota) VALUES (96103, 'ALBERT', 'PATRICK', 'PARIS', 1);
INSERT INTO adherent (numa, noma, prenoma, villea, cota) VALUES (96109, 'CHOCOLO', 'PATRICK', 'MARSEILLE', 1);
INSERT INTO adherent (numa, noma, prenoma, villea, cota) VALUES (96122, 'ELEON', 'JEANNE', 'PARIS', 1);
INSERT INTO adherent (numa, noma, prenoma, villea, cota) VALUES (96456, 'WALTER', 'DEBORAH', 'VERSAILLES', 1);


-- 
-- Contenu de la table 'voyage'
-- 

INSERT INTO voyage (refv, destv, dureev, coutv, typev) VALUES (101, 'TUNISIE', 2, '9500.00', 'RD');
INSERT INTO voyage (refv, destv, dureev, coutv, typev) VALUES (109, 'TUNISIE', 1, '7500.00', 'SD');
INSERT INTO voyage (refv, destv, dureev, coutv, typev) VALUES (201, 'GRECE', 2, '9000.00', 'CT');
INSERT INTO voyage (refv, destv, dureev, coutv, typev) VALUES (202, 'TURQUIE', 2, '9900.00', 'SD');
INSERT INTO voyage (refv, destv, dureev, coutv, typev) VALUES (203, 'TURQUIE', 3, '14000.00', 'SD');
INSERT INTO voyage (refv, destv, dureev, coutv, typev) VALUES (204, 'TURQUIE', 4, '17000.00', 'SD');
INSERT INTO voyage (refv, destv, dureev, coutv, typev) VALUES (205, 'TURQUIE', 1, '7000.00', 'SD');
INSERT INTO voyage (refv, destv, dureev, coutv, typev) VALUES (211, 'TURQUIE', 1, '8800.00', 'CT');
INSERT INTO voyage (refv, destv, dureev, coutv, typev) VALUES (212, 'TURQUIE', 2, '12500.00', 'CT');
INSERT INTO voyage (refv, destv, dureev, coutv, typev) VALUES (213, 'TURQUIE', 2, '14000.00', 'RD');
INSERT INTO voyage (refv, destv, dureev, coutv, typev) VALUES (301, 'PORTUGAL', 2, '5990.00', 'SD');
INSERT INTO voyage (refv, destv, dureev, coutv, typev) VALUES (304, 'ESPAGNE', 2, '9000.00', 'CT');
INSERT INTO voyage (refv, destv, dureev, coutv, typev) VALUES (313, 'TUNISIE', 2, '7500.00', 'SD');
INSERT INTO voyage (refv, destv, dureev, coutv, typev) VALUES (314, 'TUNISIE', 1, '5900.00', 'SD');
INSERT INTO voyage (refv, destv, dureev, coutv, typev) VALUES (315, 'TUNISIE', 4, '15000.00', 'SD');
INSERT INTO voyage (refv, destv, dureev, coutv, typev) VALUES (317, 'TUNISIE', 2, '8800.00', 'CT');
INSERT INTO voyage (refv, destv, dureev, coutv, typev) VALUES (318, 'TUNISIE', 1, '6900.00', 'CT');
INSERT INTO voyage (refv, destv, dureev, coutv, typev) VALUES (401, 'NORVEGE', 2, '15000.00', 'RD');
INSERT INTO voyage (refv, destv, dureev, coutv, typev) VALUES (404, 'NORVEGE', 1, '16300.00', 'RD');
INSERT INTO voyage (refv, destv, dureev, coutv, typev) VALUES (421, 'NORVEGE', 2, '25000.00', 'RD');
INSERT INTO voyage (refv, destv, dureev, coutv, typev) VALUES (512, 'GRECE', 1, '5000.00', 'CT');
INSERT INTO voyage (refv, destv, dureev, coutv, typev) VALUES (514, 'ESPAGNE', 1, '7000.00', 'CT');
INSERT INTO voyage (refv, destv, dureev, coutv, typev) VALUES (515, 'ESPAGNE', 4, '19000.00', 'SD');
INSERT INTO voyage (refv, destv, dureev, coutv, typev) VALUES (545, 'GRECE', 2, '9500.00', 'SD');
INSERT INTO voyage (refv, destv, dureev, coutv, typev) VALUES (602, 'ESPAGNE', 1, '2500.00', 'SD');
INSERT INTO voyage (refv, destv, dureev, coutv, typev) VALUES (603, 'ITALIE', 1, '3780.00', 'CT');
INSERT INTO voyage (refv, destv, dureev, coutv, typev) VALUES (605, 'ITALIE', 2, '5900.00', 'CT');
INSERT INTO voyage (refv, destv, dureev, coutv, typev) VALUES (607, 'ITALIE', 2, '8700.00', 'SD');
INSERT INTO voyage (refv, destv, dureev, coutv, typev) VALUES (609, 'BALEARES', 2, '8500.00', 'SD');
INSERT INTO voyage (refv, destv, dureev, coutv, typev) VALUES (617, 'ESPAGNE', 3, '17500.00', 'SD');
INSERT INTO voyage (refv, destv, dureev, coutv, typev) VALUES (620, 'ESPAGNE', 2, '15500.00', 'RD');
INSERT INTO voyage (refv, destv, dureev, coutv, typev) VALUES (645, 'IRLANDE', 2, '9800.00', 'CT');
INSERT INTO voyage (refv, destv, dureev, coutv, typev) VALUES (655, 'HOLLANDE', 1, '5900.00', 'CT');
INSERT INTO voyage (refv, destv, dureev, coutv, typev) VALUES (677, 'HOLLANDE', 2, '8800.00', 'SD');
INSERT INTO voyage (refv, destv, dureev, coutv, typev) VALUES (688, 'DANEMARK', 1, '7900.00', 'RD');


-- 
-- Contenu de la table 'depart'
-- 

INSERT INTO depart (refv, datedep) VALUES (101, '1998-05-15');
INSERT INTO depart (refv, datedep) VALUES (101, '1998-08-21');
INSERT INTO depart (refv, datedep) VALUES (201, '1998-04-27');
INSERT INTO depart (refv, datedep) VALUES (201, '1998-05-07');
INSERT INTO depart (refv, datedep) VALUES (201, '1998-06-15');
INSERT INTO depart (refv, datedep) VALUES (202, '1997-07-13');
INSERT INTO depart (refv, datedep) VALUES (202, '1998-02-07');
INSERT INTO depart (refv, datedep) VALUES (202, '1998-04-29');
INSERT INTO depart (refv, datedep) VALUES (203, '1998-05-18');
INSERT INTO depart (refv, datedep) VALUES (203, '1998-06-21');
INSERT INTO depart (refv, datedep) VALUES (204, '1997-07-13');
INSERT INTO depart (refv, datedep) VALUES (204, '1998-06-21');
INSERT INTO depart (refv, datedep) VALUES (204, '1998-06-28');
INSERT INTO depart (refv, datedep) VALUES (205, '1997-07-13');
INSERT INTO depart (refv, datedep) VALUES (205, '1997-07-25');
INSERT INTO depart (refv, datedep) VALUES (211, '1997-07-13');
INSERT INTO depart (refv, datedep) VALUES (211, '1998-06-21');
INSERT INTO depart (refv, datedep) VALUES (212, '1997-07-13');
INSERT INTO depart (refv, datedep) VALUES (212, '1998-06-21');
INSERT INTO depart (refv, datedep) VALUES (213, '1998-04-27');
INSERT INTO depart (refv, datedep) VALUES (213, '1998-05-05');
INSERT INTO depart (refv, datedep) VALUES (213, '1998-05-25');
INSERT INTO depart (refv, datedep) VALUES (301, '1997-07-13');
INSERT INTO depart (refv, datedep) VALUES (301, '1997-08-01');
INSERT INTO depart (refv, datedep) VALUES (301, '1998-04-15');
INSERT INTO depart (refv, datedep) VALUES (304, '1998-04-27');
INSERT INTO depart (refv, datedep) VALUES (304, '1998-05-07');
INSERT INTO depart (refv, datedep) VALUES (304, '1998-08-01');
INSERT INTO depart (refv, datedep) VALUES (313, '1997-07-13');
INSERT INTO depart (refv, datedep) VALUES (313, '1998-04-15');
INSERT INTO depart (refv, datedep) VALUES (314, '1998-06-21');
INSERT INTO depart (refv, datedep) VALUES (315, '1997-07-13');
INSERT INTO depart (refv, datedep) VALUES (315, '1998-05-25');
INSERT INTO depart (refv, datedep) VALUES (315, '1998-06-21');
INSERT INTO depart (refv, datedep) VALUES (317, '1997-07-13');
INSERT INTO depart (refv, datedep) VALUES (317, '1998-05-25');
INSERT INTO depart (refv, datedep) VALUES (317, '1998-06-21');
INSERT INTO depart (refv, datedep) VALUES (318, '1997-07-13');
INSERT INTO depart (refv, datedep) VALUES (318, '1998-06-21');
INSERT INTO depart (refv, datedep) VALUES (401, '1998-09-01');
INSERT INTO depart (refv, datedep) VALUES (401, '1998-10-10');
INSERT INTO depart (refv, datedep) VALUES (404, '1997-09-01');
INSERT INTO depart (refv, datedep) VALUES (404, '1997-10-20');
INSERT INTO depart (refv, datedep) VALUES (421, '1997-09-09');
INSERT INTO depart (refv, datedep) VALUES (512, '1998-04-25');
INSERT INTO depart (refv, datedep) VALUES (512, '1998-06-21');
INSERT INTO depart (refv, datedep) VALUES (514, '1997-07-13');
INSERT INTO depart (refv, datedep) VALUES (514, '1997-07-27');
INSERT INTO depart (refv, datedep) VALUES (514, '1998-04-25');
INSERT INTO depart (refv, datedep) VALUES (515, '1997-07-13');
INSERT INTO depart (refv, datedep) VALUES (545, '1997-07-13');
INSERT INTO depart (refv, datedep) VALUES (545, '1998-02-27');
INSERT INTO depart (refv, datedep) VALUES (545, '1998-05-25');
INSERT INTO depart (refv, datedep) VALUES (545, '1998-06-21');
INSERT INTO depart (refv, datedep) VALUES (602, '1997-07-13');
INSERT INTO depart (refv, datedep) VALUES (602, '1998-04-27');
INSERT INTO depart (refv, datedep) VALUES (603, '1997-07-13');
INSERT INTO depart (refv, datedep) VALUES (603, '1998-06-21');
INSERT INTO depart (refv, datedep) VALUES (605, '1997-07-13');
INSERT INTO depart (refv, datedep) VALUES (605, '1998-06-21');
INSERT INTO depart (refv, datedep) VALUES (605, '1998-06-28');
INSERT INTO depart (refv, datedep) VALUES (607, '1997-07-13');
INSERT INTO depart (refv, datedep) VALUES (607, '1998-06-21');
INSERT INTO depart (refv, datedep) VALUES (609, '1998-06-21');
INSERT INTO depart (refv, datedep) VALUES (617, '1997-07-13');
INSERT INTO depart (refv, datedep) VALUES (617, '1998-06-21');
INSERT INTO depart (refv, datedep) VALUES (620, '1998-06-21');
INSERT INTO depart (refv, datedep) VALUES (645, '1998-06-21');
INSERT INTO depart (refv, datedep) VALUES (655, '1998-06-21');
INSERT INTO depart (refv, datedep) VALUES (677, '1998-06-21');
INSERT INTO depart (refv, datedep) VALUES (688, '1998-06-21');

-- 
-- Contenu de la table 'reservation'
-- 

INSERT INTO reservation (ndossier, numa, refv, datedep, acompte) VALUES (1, 90105, 202, '1998-04-29', '2500.00');
INSERT INTO reservation (ndossier, numa, refv, datedep, acompte) VALUES (2, 92008, 313, '1998-04-15', '1800.00');
INSERT INTO reservation (ndossier, numa, refv, datedep, acompte) VALUES (3, 94100, 404, '1997-09-01', '3000.00');
INSERT INTO reservation (ndossier, numa, refv, datedep, acompte) VALUES (4, 92450, 301, '1997-08-01', '2000.00');
INSERT INTO reservation (ndossier, numa, refv, datedep, acompte) VALUES (5, 96010, 213, '1998-05-05', '4500.00');
INSERT INTO reservation (ndossier, numa, refv, datedep, acompte) VALUES (6, 94500, 514, '1998-04-25', '3000.00');
INSERT INTO reservation (ndossier, numa, refv, datedep, acompte) VALUES (7, 96109, 545, '1998-02-27', '1800.00');
INSERT INTO reservation (ndossier, numa, refv, datedep, acompte) VALUES (8, 96456, 202, '1998-02-07', '3000.00');
INSERT INTO reservation (ndossier, numa, refv, datedep, acompte) VALUES (9, 96102, 301, '1998-04-15', '2500.00');
INSERT INTO reservation (ndossier, numa, refv, datedep, acompte) VALUES (10, 92008, 314, '1998-06-21', '3000.00');
INSERT INTO reservation (ndossier, numa, refv, datedep, acompte) VALUES (11, 93807, 421, '1997-09-09', '5000.00');
INSERT INTO reservation (ndossier, numa, refv, datedep, acompte) VALUES (12, 94100, 202, '1998-04-29', '3000.00');
INSERT INTO reservation (ndossier, numa, refv, datedep, acompte) VALUES (13, 93807, 314, '1998-06-21', '2900.00');
INSERT INTO reservation (ndossier, numa, refv, datedep, acompte) VALUES (14, 93807, 313, '1998-04-15', '2000.00');
INSERT INTO reservation (ndossier, numa, refv, datedep, acompte) VALUES (15, 96010, 314, '1998-06-21', '2850.00');
INSERT INTO reservation (ndossier, numa, refv, datedep, acompte) VALUES (16, 95077, 101, '1998-05-15', '1900.00');
INSERT INTO reservation (ndossier, numa, refv, datedep, acompte) VALUES (17, 95077, 401, '1998-09-01', '3000.00');
INSERT INTO reservation (ndossier, numa, refv, datedep, acompte) VALUES (18, 93001, 401, '1998-09-01', '3000.00');
INSERT INTO reservation (ndossier, numa, refv, datedep, acompte) VALUES (19, 92008, 304, '1998-04-27', '1600.00');
INSERT INTO reservation (ndossier, numa, refv, datedep, acompte) VALUES (20, 92450, 304, '1998-05-07', '1500.00');
INSERT INTO reservation (ndossier, numa, refv, datedep, acompte) VALUES (21, 92450, 101, '1998-08-21', '1800.00');
INSERT INTO reservation (ndossier, numa, refv, datedep, acompte) VALUES (22, 96102, 201, '1998-05-07', '2000.00');

