Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schema base de données #3

Open
tmahamadou01 opened this issue Nov 19, 2016 · 0 comments
Open

Schema base de données #3

tmahamadou01 opened this issue Nov 19, 2016 · 0 comments

Comments

@tmahamadou01
Copy link
Owner

-- MySQL Script generated by MySQL Workbench
-- dim. 20 nov. 2016 00:38:54 CET
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering

SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';


-- Schema Hydra



-- Schema Hydra


CREATE SCHEMA IF NOT EXISTS Hydra DEFAULT CHARACTER SET utf8 ;
USE Hydra ;


-- Table mydb.Categories


CREATE TABLE IF NOT EXISTS Hydra.Categories (
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR(255) NULL,
PRIMARY KEY (id))
ENGINE = InnoDB
COMMENT = 'table categorie';


-- Table mydb.Ressources


CREATE TABLE IF NOT EXISTS Hydra.Ressources (
id INT NOT NULL AUTO_INCREMENT,
link VARCHAR(255) NULL,
description VARCHAR(255) NULL,
Categories_id INT(11) NULL,
PRIMARY KEY (id),
INDEX fk_Ressources_1_idx (Categories_id ASC),
CONSTRAINT fk_Ressources_1
FOREIGN KEY (Categories_id)
REFERENCES mydb.Categories (id)
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB
COMMENT = 'table des ressources';

SET SQL_MODE=@OLD_SQL_MODE;
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant