1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132
|
-- phpMyAdmin SQL Dump
-- version 3.5.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Sep 24, 2012 at 11:01 AM
-- Server version: 5.5.25
-- PHP Version: 5.4.4
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `db_typ`
--
-- --------------------------------------------------------
--
-- Table structure for table `tb_fruits`
--
CREATE TABLE `tb_fruits` (
`id_fruits` int(11) NOT NULL AUTO_INCREMENT,
`fd_nom` varchar(45) DEFAULT NULL,
`fd_description` longtext,
`fd_calories` decimal(5,2) DEFAULT NULL,
`fd_lipide` decimal(5,2) DEFAULT NULL,
`fd_cholesterol` decimal(5,2) DEFAULT NULL,
`fd_glucides` decimal(5,2) DEFAULT NULL,
`fd_sucre` decimal(5,2) DEFAULT NULL,
`fd_proteine` decimal(5,2) DEFAULT NULL,
`fd_fibre` decimal(5,2) DEFAULT NULL,
`fd_prix_100g` decimal(5,2) DEFAULT NULL,
`fd_poids_dosette` decimal(5,2) DEFAULT NULL,
`fd_unite` varchar(8) NOT NULL,
`fd_actived` int(11) NOT NULL DEFAULT '1',
PRIMARY KEY (`id_fruits`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=13 ;
--
-- Dumping data for table `tb_fruits`
--
INSERT INTO `tb_fruits` (`id_fruits`, `fd_nom`, `fd_description`, `fd_calories`, `fd_lipide`, `fd_cholesterol`, `fd_glucides`, `fd_sucre`, `fd_proteine`, `fd_fibre`, `fd_prix_100g`, `fd_poids_dosette`, `fd_unite`, `fd_actived`) VALUES
(1, 'Orange', 'Riche en vitamine C', 1.10, 2.10, 0.33, 0.00, 0.11, 0.00, 0.00, 0.01, 10.00, 'g', 1),
(2, 'Poire', 'Pour les sportifs', 1.10, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 'g', 1),
(3, 'pomme', '', 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 'g', 0),
(4, 'Kiwi', 'Très riche en vitamine', 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 'dosette', 0),
(5, 'raisin', 'faire du vin', 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 'g', 1),
(6, 'mangue', 'exotique', 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 'g', 1),
(7, 'Lait de coco', '', 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 'l', 1),
(8, 'fraise', '', 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 'g', 1),
(9, 'framboise', '', 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 'g', 0),
(10, 'Ju d''orange', '', 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 'l', 1),
(11, 'Noix de coco', '', 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 'g', 1),
(12, 'Ananas', '', 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 'g', 1);
-- --------------------------------------------------------
--
-- Table structure for table `tb_nutrition`
--
CREATE TABLE `tb_nutrition` (
`id_nutrition` int(11) NOT NULL AUTO_INCREMENT,
`fd_name` varchar(45) DEFAULT NULL COMMENT 'fibre, sans gluten, santé du coeur, végétarien, sans sucre, booster',
`tb_recettes_id_recettes` int(11) NOT NULL,
PRIMARY KEY (`id_nutrition`),
KEY `fk_tb_nutrition_tb_recettes1_idx` (`tb_recettes_id_recettes`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `tb_recettes`
--
CREATE TABLE `tb_recettes` (
`id_recettes` int(11) NOT NULL AUTO_INCREMENT,
`fd_nom` varchar(45) NOT NULL,
`fd_description` longtext,
`fd_date_create` datetime NOT NULL,
`fd_actived` int(11) NOT NULL,
PRIMARY KEY (`id_recettes`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=20 ;
--
-- Dumping data for table `tb_recettes`
--
INSERT INTO `tb_recettes` (`id_recettes`, `fd_nom`, `fd_description`, `fd_date_create`, `fd_actived`) VALUES
(17, 'recette 2', '', '2012-09-12 01:09:07', 0),
(18, 'Recette teste', '', '2012-09-23 16:09:36', 1),
(19, 'test 22222', '', '2012-09-23 22:09:44', 1);
-- --------------------------------------------------------
--
-- Table structure for table `tb_recettes_ingredients`
--
CREATE TABLE `tb_recettes_ingredients` (
`id_ingredients` int(11) NOT NULL AUTO_INCREMENT,
`tb_recettes_id_recettes` int(11) NOT NULL,
`tb_fruits_id_fruits` int(11) NOT NULL,
`fd_quantite` decimal(5,2) NOT NULL,
PRIMARY KEY (`id_ingredients`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=33 ;
--
-- Dumping data for table `tb_recettes_ingredients`
--
INSERT INTO `tb_recettes_ingredients` (`id_ingredients`, `tb_recettes_id_recettes`, `tb_fruits_id_fruits`, `fd_quantite`) VALUES
(24, 17, 1, 0.10),
(25, 18, 8, 1.00),
(26, 18, 10, 2.00),
(27, 18, 4, 4.00),
(28, 18, 3, 6.00),
(30, 19, 6, 3.00);
--
-- Constraints for dumped tables
--
--
-- Constraints for table `tb_nutrition`
--
ALTER TABLE `tb_nutrition`
ADD CONSTRAINT `fk_tb_nutrition_tb_recettes1` FOREIGN KEY (`tb_recettes_id_recettes`) REFERENCES `tb_recettes` (`id_recettes`) ON DELETE NO ACTION ON UPDATE NO ACTION; |
Partager