Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- phpMyAdmin SQL Dump
- -- version 4.7.2
- -- https://www.phpmyadmin.net/
- --
- -- Hôte : localhost:8889
- -- Généré le : ven. 19 oct. 2018 à 09:45
- -- Version du serveur : 5.6.35
- -- Version de PHP : 7.1.6
- SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
- SET time_zone = "+00:00";
- --
- -- Base de données : `Caisse`
- --
- -- --------------------------------------------------------
- --
- -- Structure de la table `contenir`
- --
- CREATE TABLE `contenir` (
- `id` int(11) NOT NULL,
- `id_Produit` int(11) NOT NULL,
- `nombre` int(11) NOT NULL
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- -- --------------------------------------------------------
- --
- -- Structure de la table `Panier`
- --
- CREATE TABLE `Panier` (
- `id` int(11) NOT NULL,
- `date` date NOT NULL,
- `typeReglement` int(11) NOT NULL
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- -- --------------------------------------------------------
- --
- -- Structure de la table `Produit`
- --
- CREATE TABLE `Produit` (
- `id` int(11) NOT NULL,
- `prix` float NOT NULL,
- `nom` varchar(255) NOT NULL,
- `ref` varchar(255) DEFAULT NULL,
- `id_tva` int(11) NOT NULL
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- -- --------------------------------------------------------
- --
- -- Structure de la table `tva`
- --
- CREATE TABLE `tva` (
- `id` int(11) NOT NULL,
- `nom` varchar(255) NOT NULL,
- `taux` float NOT NULL
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- --
- -- Déchargement des données de la table `tva`
- --
- INSERT INTO `tva` (`id`, `nom`, `taux`) VALUES
- (0, 'std', 20),
- (1, 'emp', 5.5),
- (2, 'spe', 14.6);
- --
- -- Index pour les tables déchargées
- --
- --
- -- Index pour la table `contenir`
- --
- ALTER TABLE `contenir`
- ADD PRIMARY KEY (`id`,`id_Produit`),
- ADD KEY `contenir_Produit0_FK` (`id_Produit`);
- --
- -- Index pour la table `Panier`
- --
- ALTER TABLE `Panier`
- ADD PRIMARY KEY (`id`);
- --
- -- Index pour la table `Produit`
- --
- ALTER TABLE `Produit`
- ADD PRIMARY KEY (`id`),
- ADD KEY `Produit_tva_FK` (`id_tva`);
- --
- -- Index pour la table `tva`
- --
- ALTER TABLE `tva`
- ADD PRIMARY KEY (`id`);
- --
- -- Contraintes pour les tables déchargées
- --
- --
- -- Contraintes pour la table `contenir`
- --
- ALTER TABLE `contenir`
- ADD CONSTRAINT `contenir_Panier_FK` FOREIGN KEY (`id`) REFERENCES `Panier` (`id`),
- ADD CONSTRAINT `contenir_Produit0_FK` FOREIGN KEY (`id_Produit`) REFERENCES `Produit` (`id`);
- --
- -- Contraintes pour la table `Produit`
- --
- ALTER TABLE `Produit`
- ADD CONSTRAINT `Produit_tva_FK` FOREIGN KEY (`id_tva`) REFERENCES `tva` (`id`);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement