· 7 years ago · Jan 14, 2019, 08:14 AM
1-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
2--
3-- Host: 127.0.0.1 Database: web_catalog
4-- ------------------------------------------------------
5-- Server version 5.7.19-log
6
7/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
8/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
9/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
10/*!40101 SET NAMES utf8 */;
11/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
12/*!40103 SET TIME_ZONE='+00:00' */;
13/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
14/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
15/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
16/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
17
18--
19-- Table structure for table `categorie`
20--
21
22DROP TABLE IF EXISTS `categorie`;
23/*!40101 SET @saved_cs_client = @@character_set_client */;
24/*!40101 SET character_set_client = utf8 */;
25CREATE TABLE `categorie` (
26 `id` int(11) NOT NULL AUTO_INCREMENT,
27 `nom` varchar(45) NOT NULL,
28 PRIMARY KEY (`id`)
29) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
30/*!40101 SET character_set_client = @saved_cs_client */;
31
32--
33-- Dumping data for table `categorie`
34--
35
36LOCK TABLES `categorie` WRITE;
37/*!40000 ALTER TABLE `categorie` DISABLE KEYS */;
38INSERT INTO `categorie` VALUES (1,'images'),(2,'dvd'),(3,'torture porn');
39/*!40000 ALTER TABLE `categorie` ENABLE KEYS */;
40UNLOCK TABLES;
41
42--
43-- Table structure for table `client`
44--
45
46DROP TABLE IF EXISTS `client`;
47/*!40101 SET @saved_cs_client = @@character_set_client */;
48/*!40101 SET character_set_client = utf8 */;
49CREATE TABLE `client` (
50 `id` int(11) NOT NULL AUTO_INCREMENT,
51 `pseudo` varchar(45) DEFAULT NULL,
52 `email` varchar(45) DEFAULT NULL,
53 `telephone` varchar(45) DEFAULT NULL,
54 `adresse` varchar(250) DEFAULT NULL,
55 `mdp` varchar(45) DEFAULT NULL,
56 PRIMARY KEY (`id`)
57) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;
58/*!40101 SET character_set_client = @saved_cs_client */;
59
60--
61-- Dumping data for table `client`
62--
63
64LOCK TABLES `client` WRITE;
65/*!40000 ALTER TABLE `client` DISABLE KEYS */;
66INSERT INTO `client` VALUES (1,'jean','jean@jean.fr','010101','rue de jean, JeanVille','jeanjean'),(5,'hubert','huberà laplage@sfr.fr','0601010101010110100101101010','la plage du monde','hubertdelaterre'),(6,'roland','rolandroaln@sfr.fr','0601010101010110100101101010','roalnd dans la foret','1234'),(7,'sauron','sauron@destruLOL.lotro','060606060666060606066060','mordor','mordorismybae'),(8,'qc','qc@gmail.com','0621232123','qc à qcville','qcqc');
67/*!40000 ALTER TABLE `client` ENABLE KEYS */;
68UNLOCK TABLES;
69
70--
71-- Table structure for table `commande_client`
72--
73
74DROP TABLE IF EXISTS `commande_client`;
75/*!40101 SET @saved_cs_client = @@character_set_client */;
76/*!40101 SET character_set_client = utf8 */;
77CREATE TABLE `commande_client` (
78 `id` int(11) NOT NULL AUTO_INCREMENT,
79 `montant` decimal(6,2) NOT NULL,
80 `date_creation` datetime NOT NULL,
81 `no_confirmation` int(11) NOT NULL,
82 `client_id` int(11) NOT NULL,
83 PRIMARY KEY (`id`),
84 KEY `fk_commande_client_idx` (`client_id`),
85 CONSTRAINT `fk_commande_client_client` FOREIGN KEY (`client_id`) REFERENCES `client` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
86) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8;
87/*!40101 SET character_set_client = @saved_cs_client */;
88
89--
90-- Dumping data for table `commande_client`
91--
92
93LOCK TABLES `commande_client` WRITE;
94/*!40000 ALTER TABLE `commande_client` DISABLE KEYS */;
95INSERT INTO `commande_client` VALUES (4,106.00,'2019-01-09 13:23:33',106,8),(5,838.00,'2019-01-12 14:50:14',838,1),(7,144.00,'2019-01-12 16:57:00',144,1),(8,123.00,'2019-01-12 16:58:39',123,1),(9,288.00,'2019-01-12 17:05:19',288,8),(10,288.00,'2019-01-12 17:09:48',288,8),(11,90.00,'2019-01-12 17:14:06',90,1),(12,48.00,'2019-01-12 17:15:53',48,1),(13,24.00,'2019-01-12 17:35:24',24,8),(14,40.00,'2019-01-12 17:45:29',40,1),(15,15.00,'2019-01-12 17:50:38',15,1),(16,96.00,'2019-01-12 17:52:59',96,1);
96/*!40000 ALTER TABLE `commande_client` ENABLE KEYS */;
97UNLOCK TABLES;
98
99--
100-- Table structure for table `produit`
101--
102
103DROP TABLE IF EXISTS `produit`;
104/*!40101 SET @saved_cs_client = @@character_set_client */;
105/*!40101 SET character_set_client = utf8 */;
106CREATE TABLE `produit` (
107 `id` int(11) NOT NULL AUTO_INCREMENT,
108 `nom` varchar(45) DEFAULT NULL,
109 `prix` decimal(5,2) DEFAULT NULL,
110 `description` varchar(250) DEFAULT NULL,
111 `derniere_maj` datetime DEFAULT NULL,
112 `categorie_id` int(11) DEFAULT NULL,
113 PRIMARY KEY (`id`),
114 KEY `fk_categorie_idx` (`categorie_id`),
115 CONSTRAINT `fk_produit_categorie` FOREIGN KEY (`categorie_id`) REFERENCES `categorie` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
116) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;
117/*!40101 SET character_set_client = @saved_cs_client */;
118
119--
120-- Dumping data for table `produit`
121--
122
123LOCK TABLES `produit` WRITE;
124/*!40000 ALTER TABLE `produit` DISABLE KEYS */;
125INSERT INTO `produit` VALUES (1,'le soleil',12.00,'c\'est le soleil, voila quoi',NULL,1),(2,'la pluie',24.00,'c\'est la pluie, vite !',NULL,1),(3,'le vent',4.00,'c\'est le vent, fftftft !',NULL,1),(4,'la vie d\'adolph',96.00,'la vie d\'adlolph tier ( la rue de boulogne sur mer(on sait jamais))',NULL,2),(5,'alad\'2',-5.00,'vite vite y\'en a presque plus ! (c\'est un bon film)',NULL,2),(6,'avatar',15.00,'c\'est un super film qui n\'est pas une image',NULL,2),(7,'saw 6',96.00,'film horreur avec des saucisses de Francfort',NULL,3),(8,'saw 7',-5.00,'histoire de chaussettes',NULL,3),(9,'saw da',15.00,'ce film n\'existe pas ...',NULL,3);
126/*!40000 ALTER TABLE `produit` ENABLE KEYS */;
127UNLOCK TABLES;
128
129--
130-- Table structure for table `produit_commande`
131--
132
133DROP TABLE IF EXISTS `produit_commande`;
134/*!40101 SET @saved_cs_client = @@character_set_client */;
135/*!40101 SET character_set_client = utf8 */;
136CREATE TABLE `produit_commande` (
137 `commande_client_id` int(11) NOT NULL,
138 `produit_id` int(11) NOT NULL,
139 `quantite` int(11) DEFAULT '1',
140 `id` int(11) NOT NULL AUTO_INCREMENT,
141 PRIMARY KEY (`id`),
142 KEY `fk_produit_commande_commande_client_idx` (`commande_client_id`),
143 KEY `fk_produit_commande_produit_idx` (`produit_id`),
144 CONSTRAINT `fk_produit_commande_commande_client` FOREIGN KEY (`commande_client_id`) REFERENCES `commande_client` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
145 CONSTRAINT `fk_produit_commande_produit` FOREIGN KEY (`produit_id`) REFERENCES `produit` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
146) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8;
147/*!40101 SET character_set_client = @saved_cs_client */;
148
149--
150-- Dumping data for table `produit_commande`
151--
152
153LOCK TABLES `produit_commande` WRITE;
154/*!40000 ALTER TABLE `produit_commande` DISABLE KEYS */;
155INSERT INTO `produit_commande` VALUES (4,4,1,1),(4,5,1,2),(4,6,1,3),(5,8,10,4),(5,7,8,5),(5,9,8,6),(7,1,10,7),(7,2,1,8),(8,1,1,9),(8,4,1,10),(8,9,1,11),(9,4,3,12),(10,4,3,13),(11,6,6,14),(12,1,4,15),(13,1,2,16),(14,1,1,17),(14,2,1,18),(14,3,1,19),(15,9,1,20),(16,4,1,21);
156/*!40000 ALTER TABLE `produit_commande` ENABLE KEYS */;
157UNLOCK TABLES;
158/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
159
160/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
161/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
162/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
163/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
164/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
165/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
166/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;