-- phpMyAdmin SQL Dump -- version 2.11.6 -- http://www.phpmyadmin.net -- -- Serveur: localhost -- Généré le : Jeu 02 Août 2012 à 15:47 -- Version du serveur: 5.0.51 -- Version de PHP: 5.2.6 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; -- -- Base de données: `olympics` -- -- -------------------------------------------------------- -- -- Structure de la table `game` -- CREATE TABLE `game` ( `id` tinyint(3) unsigned NOT NULL auto_increment, `playerA_id` tinyint(3) unsigned NOT NULL, `playerB_id` tinyint(3) unsigned NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `playerA_id` (`playerA_id`,`playerB_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Contenu de la table `game` -- INSERT INTO `game` (`id`, `playerA_id`, `playerB_id`) VALUES (1, 1, 4), (2, 1, 5), (3, 2, 4), (4, 2, 5), (5, 3, 5); -- -------------------------------------------------------- -- -- Structure de la table `player` -- CREATE TABLE `player` ( `id` tinyint(3) unsigned NOT NULL auto_increment, `team_id` tinyint(3) unsigned NOT NULL, `name` varchar(50) NOT NULL, PRIMARY KEY (`id`), KEY `team_id` (`team_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ; -- -- Contenu de la table `player` -- INSERT INTO `player` (`id`, `team_id`, `name`) VALUES (1, 1, 'Laurent Dupuis'), (2, 1, 'Stéphane Leroy'), (3, 1, 'Julien le Guen'), (4, 2, 'Mark Johnsson'), (5, 2, 'John McGrath'), (6, 2, 'Alec Russell'); -- -------------------------------------------------------- -- -- Structure de la table `team` -- CREATE TABLE `team` ( `id` tinyint(3) unsigned NOT NULL auto_increment, `country` varchar(50) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ; -- -- Contenu de la table `team` -- INSERT INTO `team` (`id`, `country`) VALUES (1, 'France'), (2, 'The United Kingdom');