· 9 years ago · Oct 17, 2016, 10:14 AM
1-- phpMyAdmin SQL Dump
2-- version 3.4.11.1deb2
3-- http://www.phpmyadmin.net
4--
5-- Client: localhost
6-- Généré le: Lun 17 Octobre 2016 à 10:08
7-- Version du serveur: 5.5.31
8-- Version de PHP: 5.4.4-14+deb7u8
9
10SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
11SET time_zone = "+00:00";
12
13
14/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
15/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
16/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
17/*!40101 SET NAMES utf8 */;
18
19--
20-- Base de données: `vetiBien`
21--
22
23-- --------------------------------------------------------
24
25--
26-- Structure de la table `ENTREE_STOCK`
27--
28
29CREATE TABLE IF NOT EXISTS `ENTREE_STOCK` (
30 `NumeroEntree` int(4) NOT NULL AUTO_INCREMENT,
31 `Reference` varchar(5) DEFAULT NULL,
32 `DateEntree` datetime DEFAULT NULL,
33 `QuantiteEntree` int(11) DEFAULT '0',
34 `PrixEntree` decimal(8,0) DEFAULT '0',
35 PRIMARY KEY (`NumeroEntree`),
36 KEY `FK_RefEntree` (`Reference`)
37) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=27 ;
38
39--
40-- Contenu de la table `ENTREE_STOCK`
41--
42
43INSERT INTO `ENTREE_STOCK` (`NumeroEntree`, `Reference`, `DateEntree`, `QuantiteEntree`, `PrixEntree`) VALUES
44(1, 'P101', '2015-01-15 00:00:00', 3, 26),
45(2, 'P102', '2015-01-20 00:00:00', 3, 42),
46(3, 'P103', '2015-02-01 00:00:00', 4, 42),
47(4, 'P104', '2015-02-01 00:00:00', 3, 42),
48(5, 'P105', '2015-02-01 00:00:00', 2, 42),
49(6, 'P105', '2015-02-15 00:00:00', 5, 40),
50(7, 'P106', '2015-02-15 00:00:00', 3, 42),
51(8, 'P107', '2015-02-28 00:00:00', 2, 15),
52(9, 'P107', '2015-03-15 00:00:00', 2, 16),
53(10, 'P108', '2015-03-15 00:00:00', 2, 16),
54(11, 'P109', '2015-03-15 00:00:00', 1, 16),
55(12, 'P110', '2015-03-15 00:00:00', 2, 16),
56(13, 'P111', '2015-03-15 00:00:00', 2, 16),
57(14, 'P111', '2015-03-26 00:00:00', 2, 16),
58(15, 'P112', '2015-03-15 00:00:00', 2, 16),
59(16, 'P113', '2015-03-26 00:00:00', 2, 27),
60(17, 'P114', '2015-03-26 00:00:00', 3, 27),
61(18, 'P114', '2015-04-10 00:00:00', 2, 28),
62(19, 'P115', '2015-04-10 00:00:00', 1, 45),
63(20, 'P116', '2015-04-10 00:00:00', 2, 45),
64(21, 'P117', '2015-04-22 00:00:00', 3, 48),
65(22, 'P118', '2015-04-22 00:00:00', 2, 22),
66(23, 'P119', '2015-04-22 00:00:00', 5, 22),
67(24, 'P120', '2015-04-22 00:00:00', 2, 22),
68(25, 'P102', '2015-05-01 00:00:00', 2, 38),
69(26, 'P116', '2015-05-20 00:00:00', 2, 45);
70
71-- --------------------------------------------------------
72
73--
74-- Structure de la table `PRODUIT`
75--
76
77CREATE TABLE IF NOT EXISTS `PRODUIT` (
78 `Reference` varchar(5) NOT NULL,
79 `Libelle` varchar(50) DEFAULT NULL,
80 `Taille` varchar(2) DEFAULT NULL,
81 `Couleur` varchar(15) DEFAULT NULL,
82 `PrixVente` float(8,0) DEFAULT '0',
83 `QuantiteEnStock` int(11) DEFAULT '0',
84 PRIMARY KEY (`Reference`)
85) ENGINE=InnoDB DEFAULT CHARSET=latin1;
86
87--
88-- Contenu de la table `PRODUIT`
89--
90
91INSERT INTO `PRODUIT` (`Reference`, `Libelle`, `Taille`, `Couleur`, `PrixVente`, `QuantiteEnStock`) VALUES
92('P101', 'Pull en laine', '1', 'bleu', 50, 2),
93('P102', 'Pull marin', '1', 'blanc', 75, 1),
94('P103', 'Pull marin', '2', 'blanc', 75, 2),
95('P104', 'Pull marin', '3', 'blanc', 75, 1),
96('P105', 'Pull marin', '1', 'bleu', 75, 3),
97('P106', 'Pull marin', '3', 'bleu', 75, 1),
98('P107', 'Polo labuze', '1', 'vert', 32, 1),
99('P108', 'Polo labuze', '2', 'vert', 32, 2),
100('P109', 'Polo labuze', '4', 'vert', 32, 1),
101('P110', 'Polo labuze', '1', 'rouge', 32, 1),
102('P111', 'Polo labuze', '3', 'rouge', 32, 3),
103('P112', 'Polo labuze', '4', 'rouge', 32, 0),
104('P113', 'Robe vichy', '2', 'blanc', 43, 2),
105('P114', 'Robe vichy', '3', 'blanc', 43, 0),
106('P115', 'Veste lin', '1', 'crème', 68, 1),
107('P116', 'Veste lin', '2', 'crème', 68, 3),
108('P117', 'Veste lin', '3', 'crème', 68, 3),
109('P118', 'Veste toile', '1', 'jaune', 56, 1),
110('P119', 'Veste laine', '2', 'jaune', 56, 4),
111('P120', 'Veste laine', '3', 'jaune', 56, 1);
112
113-- --------------------------------------------------------
114
115--
116-- Structure de la table `SORTIE_STOCK`
117--
118
119CREATE TABLE IF NOT EXISTS `SORTIE_STOCK` (
120 `NumeroSortie` int(4) NOT NULL DEFAULT '0',
121 `Reference` varchar(5) DEFAULT NULL,
122 `DateSortie` date DEFAULT NULL,
123 `QuantiteSortie` int(11) DEFAULT '0',
124 PRIMARY KEY (`NumeroSortie`),
125 KEY `FK_RefSortie` (`Reference`)
126) ENGINE=InnoDB DEFAULT CHARSET=latin1;
127
128--
129-- Contenu de la table `SORTIE_STOCK`
130--
131
132INSERT INTO `SORTIE_STOCK` (`NumeroSortie`, `Reference`, `DateSortie`, `QuantiteSortie`) VALUES
133(1, 'P101', '2015-01-17', 1),
134(2, 'P102', '2015-01-25', 1),
135(3, 'P102', '2015-01-28', 2),
136(4, 'P103', '2015-02-01', 1),
137(5, 'P105', '2015-02-02', 2),
138(6, 'P104', '2015-02-03', 2),
139(7, 'P103', '2015-02-10', 1),
140(8, 'P106', '2015-02-17', 2),
141(9, 'P105', '2015-02-18', 1),
142(10, 'P112', '2015-03-15', 2),
143(11, 'P111', '2015-03-16', 1),
144(12, 'P107', '2015-03-16', 1),
145(13, 'P110', '2015-03-18', 1),
146(14, 'P107', '2015-03-19', 2),
147(15, 'P114', '2015-03-28', 2),
148(16, 'P114', '2015-04-13', 3),
149(17, 'P116', '2015-04-15', 1),
150(18, 'P105', '2015-05-04', 1),
151(19, 'P120', '2015-05-27', 1),
152(20, 'P118', '2015-05-28', 1),
153(21, 'P102', '2015-06-02', 1),
154(22, 'P119', '2015-08-15', 1);
155
156--
157-- Contraintes pour les tables exportées
158--
159
160--
161-- Contraintes pour la table `ENTREE_STOCK`
162--
163ALTER TABLE `ENTREE_STOCK`
164 ADD CONSTRAINT `FK_RefEntree` FOREIGN KEY (`Reference`) REFERENCES `PRODUIT` (`Reference`);
165
166--
167-- Contraintes pour la table `SORTIE_STOCK`
168--
169ALTER TABLE `SORTIE_STOCK`
170 ADD CONSTRAINT `FK_RefSortie` FOREIGN KEY (`Reference`) REFERENCES `PRODUIT` (`Reference`);
171
172/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
173/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
174/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;