« tout attribut du deuxième groupe ne peut pas dépendre que d'un sous-ensemble (strict) d'attribut(s) du deuxième groupe »
INSERT INTO UNITE (idUnite, libelleUnite) VALUES
(1, '1000 tonnes'), (2, 'millions de KWh'), (3, 'millions de m3')
;
INSERT INTO SECTEUR (idSecteur, libelleSecteur, idUnite) VALUES
(1, 'produits phosphates', 1), (2, 'eau', 3), (3, 'électricité', 2), (4, 'produits arachidiers', 1)
;
INSERT INTO MATIERE (idSecteur, idMatiere, libelleMatiere) VALUES
(1, 1, 'phos. calcium'), (1, 2, 'attapulgite')
, (4, 3, 'huile brute'), (4, 4, 'huile raffinée'), (4, 5, 'tourteaux')
, (3, 6, 'basse tension'), (3, 7, 'moyenne tension'), (3, 8, 'haute tension')
, (2, 9, 'production'), (2, 10, 'production vendue')
;
-- Phosphates
INSERT INTO QUANTITE (idMatiere, annee, mois, valeur) VALUES
(1, 2006, 1, 119.0), (1, 2006, 2, 100.0), (1, 2006, 3, 0.0), (1, 2006, 4, 0.0)
, (1, 2006, 5, 121.0), (1, 2006, 6, 50.0), (1, 2006, 7, 0.0), (1, 2006, 8, 0.0)
, (1, 2006, 9, 0.0), (1, 2006, 10, 51.0), (1, 2006, 11, 66.0), (1, 2006, 12, 77.0)
, (1, 2007, 1, 72.0), (1, 2007, 2, 60.0), (1, 2007, 3, 50.0), (1, 2007, 4, 96.0)
, (1, 2007, 5, 70.3), (1, 2007, 6, 56.0), (1, 2007, 7, 73.0), (1, 2007, 8, 51.0)
, (1, 2007, 9, 47.0), (1, 2007, 10, 44.0), (1, 2007, 11, 60.0), (1, 2007, 12, 38.9)
, (2, 2006, 1, 13.5), (2, 2006, 2, 14.9), (2, 2006, 3, 11.3), (2, 2006, 4, 9.5)
, (2, 2006, 5, 10.6), (2, 2006, 6, 14.2), (2, 2006, 7, 12.3), (2, 2006, 8, 16.7)
, (2, 2006, 9, 10.5), (2, 2006, 10, 7.1), (2, 2006, 11, 10.6), (2, 2006, 12, 20.0)
, (2, 2007, 1, 10.2), (2, 2007, 2, 10.3), (2, 2007, 3, 6.9), (2, 2007, 4, 9.3)
, (2, 2007, 5, 10.4), (2, 2007, 6, 14.4), (2, 2007, 7, 12.5), (2, 2007, 8, 11.1)
, (2, 2007, 9, 10.4), (2, 2007, 10, 13.2), (2, 2007, 11, 7.5), (2, 2007, 12, 17.5)
;
-- Produits arachidiers
INSERT INTO QUANTITE (idMatiere, annee, mois, valeur) VALUES
(3, 2006, 1, 0.0), (3, 2006, 2, 1.2), (3, 2006, 3, 6.8), (3, 2006, 4, 5.0)
, (3, 2006, 5, 6.0), (3, 2006, 6, 7.1), (3, 2006, 7, 6.4), (3, 2006, 8, 5.1)
, (3, 2006, 9, 3.0), (3, 2006, 10, 7.5), (3, 2006, 11, 9.2), (3, 2006, 12, 6.1)
, (3, 2007, 1, 4.2), (3, 2007, 2, 6.7), (3, 2007, 3, 7.4), (3, 2007, 4, 8.7)
, (3, 2007, 5, 8.2), (3, 2007, 6, 7.7), (3, 2007, 7, 0.0), (3, 2007, 8, 2.1)
, (3, 2007, 9, 0.0), (3, 2007, 10, 0.0), (3, 2007, 11, 0.0), (3, 2007, 12, 0.0)
, (4, 2006, 1, 5.2), (4, 2006, 2, 6.0), (4, 2006, 3, 7.4), (4, 2006, 4, 9.3)
, (4, 2006, 5, 8.3), (4, 2006, 6, 9.8), (4, 2006, 7, 6.7), (4, 2006, 8, 7.7)
, (4, 2006, 9, 7.2), (4, 2006, 10, 8.2), (4, 2006, 11, 10.0), (4, 2006, 12, 8.9)
, (4, 2007, 1, 5.4), (4, 2007, 2, 12.1), (4, 2007, 3, 9.2), (4, 2007, 4, 4.0)
, (4, 2007, 5, 6.8), (4, 2007, 6, 3.5), (4, 2007, 7, 9.4), (4, 2007, 8, 8.9)
, (4, 2007, 9, 7.6), (4, 2007, 10, 8.0), (4, 2007, 11, 8.2), (4, 2007, 12, 9.3)
, (5, 2006, 1, 0.0), (5, 2006, 2, 1.3), (5, 2006, 3, 8.5), (5, 2006, 4, 5.8)
, (5, 2006, 5, 5.6), (5, 2006, 6, 3.5), (5, 2006, 7, 11.2), (5, 2006, 8, 7.9)
, (5, 2006, 9, 4.8), (5, 2006, 10, 8.6), (5, 2006, 11, 11.0), (5, 2006, 12, 8.0)
, (5, 2007, 1, 5.4), (5, 2007, 2, 6.2), (5, 2007, 3, 8.6), (5, 2007, 4, 11.0)
, (5, 2007, 5, 9.3), (5, 2007, 6, 9.9), (5, 2007, 7, 1.7), (5, 2007, 8, 1.4)
, (5, 2007, 9, 0.8), (5, 2007, 10, 0.3), (5, 2007, 11, 0.0), (5, 2007, 12, 0.0)
;
Partager