Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
Base de données
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
procom2022-robotise
Base de données
Commits
df666856
Commit
df666856
authored
1 year ago
by
MAUGEZ Emeline
Browse files
Options
Downloads
Patches
Plain Diff
ajout couleur pour test
parent
7118c3ae
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bdd_couleur.sql
+58
-0
58 additions, 0 deletions
bdd_couleur.sql
with
58 additions
and
0 deletions
bdd_couleur.sql
0 → 100644
+
58
−
0
View file @
df666856
DROP
DATABASE
IF
EXISTS
robotise
;
CREATE
DATABASE
robotise
;
DROP
USER
IF
EXISTS
'robotise'
@
'localhost'
;
CREATE
USER
'robotise'
@
'localhost'
IDENTIFIED
BY
'a693bc7501ca6755ce67329132f581ca'
;
GRANT
ALL
PRIVILEGES
ON
robotise
.
*
TO
'robotise'
@
'localhost'
;
FLUSH
PRIVILEGES
;
CREATE
TABLE
robotise
.
machine
(
id_bec
INT
NOT
NULL
PRIMARY
KEY
,
quantite
INT
);
CREATE
TABLE
robotise
.
ingredient
(
id_ingredient
INT
NOT
NULL
PRIMARY
KEY
AUTO_INCREMENT
,
id_bec
INT
REFERENCES
machine
(
id_bec
),
nom_ingredient
VARCHAR
(
50
)
NOT
NULL
);
CREATE
TABLE
robotise
.
cocktail
(
id_cocktail
INT
NOT
NULL
PRIMARY
KEY
AUTO_INCREMENT
,
nom_cocktail
VARCHAR
(
50
)
NOT
NULL
);
CREATE
TABLE
robotise
.
composition
(
id_cocktail
INT
REFERENCES
cocktail
(
id_cocktail
)
ON
DELETE
CASCADE
,
id_ingredient
INT
REFERENCES
ingredient
(
id_ingredient
)
ON
DELETE
CASCADE
,
quantite
INT
);
INSERT
INTO
robotise
.
cocktail
(
nom_cocktail
)
VALUES
(
'rouge'
);
INSERT
INTO
robotise
.
cocktail
(
nom_cocktail
)
VALUES
(
'bleu'
);
INSERT
INTO
robotise
.
cocktail
(
nom_cocktail
)
VALUES
(
'jaune'
);
INSERT
INTO
robotise
.
cocktail
(
nom_cocktail
)
VALUES
(
'vert'
);
INSERT
INTO
robotise
.
cocktail
(
nom_cocktail
)
VALUES
(
'violet'
);
INSERT
INTO
robotise
.
cocktail
(
nom_cocktail
)
VALUES
(
'orange'
);
INSERT
INTO
robotise
.
machine
(
id_bec
,
quantite
)
VALUES
(
0
,
NULL
);
INSERT
INTO
robotise
.
machine
(
id_bec
,
quantite
)
VALUES
(
1
,
NULL
);
INSERT
INTO
robotise
.
machine
(
id_bec
,
quantite
)
VALUES
(
2
,
NULL
);
INSERT
INTO
robotise
.
machine
(
id_bec
,
quantite
)
VALUES
(
3
,
NULL
);
INSERT
INTO
robotise
.
machine
(
id_bec
,
quantite
)
VALUES
(
4
,
NULL
);
INSERT
INTO
robotise
.
machine
(
id_bec
,
quantite
)
VALUES
(
5
,
NULL
);
INSERT
INTO
robotise
.
ingredient
(
id_bec
,
nom_ingredient
)
VALUES
(
1
,
'rouge'
);
INSERT
INTO
robotise
.
ingredient
(
id_bec
,
nom_ingredient
)
VALUES
(
2
,
'jaune'
);
INSERT
INTO
robotise
.
ingredient
(
id_bec
,
nom_ingredient
)
VALUES
(
3
,
'bleu'
);
INSERT
INTO
robotise
.
composition
(
id_cocktail
,
id_ingredient
,
quantite
)
VALUES
(
1
,
1
,
10
);
INSERT
INTO
robotise
.
composition
(
id_cocktail
,
id_ingredient
,
quantite
)
VALUES
(
2
,
2
,
10
);
INSERT
INTO
robotise
.
composition
(
id_cocktail
,
id_ingredient
,
quantite
)
VALUES
(
3
,
3
,
10
);
INSERT
INTO
robotise
.
composition
(
id_cocktail
,
id_ingredient
,
quantite
)
VALUES
(
4
,
2
,
5
);
INSERT
INTO
robotise
.
composition
(
id_cocktail
,
id_ingredient
,
quantite
)
VALUES
(
4
,
3
,
5
);
INSERT
INTO
robotise
.
composition
(
id_cocktail
,
id_ingredient
,
quantite
)
VALUES
(
5
,
1
,
5
);
INSERT
INTO
robotise
.
composition
(
id_cocktail
,
id_ingredient
,
quantite
)
VALUES
(
5
,
3
,
5
);
INSERT
INTO
robotise
.
composition
(
id_cocktail
,
id_ingredient
,
quantite
)
VALUES
(
6
,
1
,
5
);
INSERT
INTO
robotise
.
composition
(
id_cocktail
,
id_ingredient
,
quantite
)
VALUES
(
6
,
2
,
5
);
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment