diff --git a/init/09_vit.sql b/init/09_vit.sql index 21deb7fa2b67b2959c7b600a630064eaa6e28cf4..582d4d402da202f53477cdbd63175e7cc74276a8 100644 --- a/init/09_vit.sql +++ b/init/09_vit.sql @@ -79,12 +79,39 @@ INSERT INTO PRAEPARAT VALUES -- ============================================================================ +CREATE TABLE STOFF_KATEGORIE( + KAT CHAR(1) NOT NULL, + BEZEICHNUNG VARCHAR(30) NOT NULL, + SORT_NR NUMERIC(1) NOT NULL, + CONSTRAINT STOFF_KATEGORIE_PK + PRIMARY KEY(KAT), + CONSTRAINT STOFF_KATEGORIE_SORT_NR_EINDEUTIG + UNIQUE(SORT_NR), + CONSTRAINT KATEGORIE_SORT_NR_NICHT_NEGATIV + CHECK(SORT_NR >= 0) +); + +INSERT INTO STOFF_KATEGORIE VALUES ('V', 'Vitamine', 1); +INSERT INTO STOFF_KATEGORIE VALUES ('M', 'Mineralstoffe', 2); +INSERT INTO STOFF_KATEGORIE VALUES ('S', 'Spurenelemente', 3); +INSERT INTO STOFF_KATEGORIE VALUES ('C', 'Carotinoide', 4); +INSERT INTO STOFF_KATEGORIE VALUES ('A', 'Aminosäuren und -Verbindungen', 5); +INSERT INTO STOFF_KATEGORIE VALUES ('X', 'Sonstiges', 6); + +-- Sekundäre Pflanzenstoffe? +-- Coenzym Q10? + +-- ============================================================================ + CREATE TABLE STOFF( VIT VARCHAR(20) NOT NULL, EINHEIT VARCHAR(10) NOT NULL, TAGESDOSIS NUMERIC(4) NULL, + KAT CHAR(1) NOT NULL, CONSTRAINT STOFF_PK PRIMARY KEY(VIT), + CONSTRAINT STOFF_REF_KATEGORIE + FOREIGN KEY(KAT) REFERENCES STOFF_KATEGORIE(KAT), CONSTRAINT STOFF_TAGESDOSIS_NICHT_NEGATIV CHECK(TAGESDOSIS >= 0) ); @@ -94,24 +121,24 @@ CREATE TABLE STOFF( -- https://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=OJ:L:2011:304:0018:0063:de:PDF -- Anhang XIII, Seite 44 von 46 (22.11.2011) -INSERT INTO STOFF VALUES('A', 'ug', 800); -INSERT INTO STOFF VALUES('B1/Thiamin', 'mg', 1.1); -INSERT INTO STOFF VALUES('B2/Riboflavin', 'mg', 1.4); -INSERT INTO STOFF VALUES('B3/Niacin', 'mg', 16); -INSERT INTO STOFF VALUES('B5/Pantothensäure', 'mg', 6); -INSERT INTO STOFF VALUES('B6', 'mg', 1.4); -INSERT INTO STOFF VALUES('B7/Biotin', 'ug', 50); -INSERT INTO STOFF VALUES('B9/Folsäure', 'ug', 200); -INSERT INTO STOFF VALUES('B12', 'ug', 2.5); -INSERT INTO STOFF VALUES('C', 'mg', 80); -INSERT INTO STOFF VALUES('D', 'ug', 5); -INSERT INTO STOFF VALUES('E', 'mg', 12); +INSERT INTO STOFF VALUES('A', 'ug', 800, 'V'); +INSERT INTO STOFF VALUES('B1/Thiamin', 'mg', 1.1, 'V'); +INSERT INTO STOFF VALUES('B2/Riboflavin', 'mg', 1.4, 'V'); +INSERT INTO STOFF VALUES('B3/Niacin', 'mg', 16, 'V'); +INSERT INTO STOFF VALUES('B5/Pantothensäure', 'mg', 6, 'V'); +INSERT INTO STOFF VALUES('B6', 'mg', 1.4, 'V'); +INSERT INTO STOFF VALUES('B7/Biotin', 'ug', 50, 'V'); +INSERT INTO STOFF VALUES('B9/Folsäure', 'ug', 200, 'V'); +INSERT INTO STOFF VALUES('B12', 'ug', 2.5, 'V'); +INSERT INTO STOFF VALUES('C', 'mg', 80, 'V'); +INSERT INTO STOFF VALUES('D', 'ug', 5, 'V'); +INSERT INTO STOFF VALUES('E', 'mg', 12, 'V'); -- Vitamin E ist eine ganze Vitamin-Gruppe, die aus 8 verschiedenen -- Verbindungen besteht. -- Diese unterteilen sich in 4 Tocopherole und 4 Tocotrienole, -- die jeweils durch den Vorsatz alpha, beta, gamma, delta unterschieden werden. -INSERT INTO STOFF VALUES('K', 'ug', 75); -INSERT INTO STOFF VALUES('K2', 'ug', 75); +INSERT INTO STOFF VALUES('K', 'ug', 75, 'V'); +INSERT INTO STOFF VALUES('K2', 'ug', 75, 'V'); -- In der EU Lebensmittelverordnung ist nur Vitamin K aufgefuehrt. -- Es sind aber verschiedene Stoffe: -- Phyllochinon (Vitamin K1) @@ -120,38 +147,38 @@ INSERT INTO STOFF VALUES('K2', 'ug', 75); -- "Das synthetische Vitamin K3 wird aus Toxizitätsgründen heute nicht mehr -- verwendet." -INSERT INTO STOFF VALUES('Kalium', 'mg', 2000); -INSERT INTO STOFF VALUES('Natrium', 'mg', NULL); -INSERT INTO STOFF VALUES('Chlor', 'mg', 800); -INSERT INTO STOFF VALUES('Calcium', 'mg', 800); -INSERT INTO STOFF VALUES('Phosphor', 'mg', 700); -INSERT INTO STOFF VALUES('Magnesium', 'mg', 375); -INSERT INTO STOFF VALUES('Eisen', 'mg', 14); -INSERT INTO STOFF VALUES('Zink', 'mg', 10); -INSERT INTO STOFF VALUES('Kupfer', 'ug', 1000); -INSERT INTO STOFF VALUES('Mangan', 'mg', 2); -INSERT INTO STOFF VALUES('Fluor', 'mg', 3.5); -INSERT INTO STOFF VALUES('Selen', 'ug', 55); -INSERT INTO STOFF VALUES('Chrom', 'ug', 40); -INSERT INTO STOFF VALUES('Molybdän', 'ug', 50); -INSERT INTO STOFF VALUES('Jod', 'ug', 150); - -INSERT INTO STOFF VALUES('Q10', 'mg', NULL); -INSERT INTO STOFF VALUES('Lutein', 'mg', NULL); -- bei Abtei ug - -INSERT INTO STOFF VALUES('L-Arginin', 'mg', NULL); -INSERT INTO STOFF VALUES('L-Carnitin', 'mg', NULL); -INSERT INTO STOFF VALUES('Cholin', 'mg', NULL); -INSERT INTO STOFF VALUES('Isoflavone', 'mg', NULL); -INSERT INTO STOFF VALUES('Zeaxanthin', 'ug', NULL); -INSERT INTO STOFF VALUES('Lycopin', 'mg', NULL); - --- Moegliche Klassifikation: --- Vitamine --- Spurenelemente --- Sekundäre Pflanzenstoffe --- Aminosäuren --- Coenzym Q10 +INSERT INTO STOFF VALUES('Kalium', 'mg', 2000, 'M'); +INSERT INTO STOFF VALUES('Calcium', 'mg', 800, 'M'); +INSERT INTO STOFF VALUES('Natrium', 'mg', NULL, 'M'); +INSERT INTO STOFF VALUES('Phosphor', 'mg', 700, 'M'); +INSERT INTO STOFF VALUES('Magnesium', 'mg', 375, 'M'); +INSERT INTO STOFF VALUES('Chlor', 'mg', 800, 'M'); + +-- Spurenelemente: Im Koerper weniger als 50 mg pro Kilogramm Koerpergewicht. +INSERT INTO STOFF VALUES('Eisen', 'mg', 14, 'S'); +INSERT INTO STOFF VALUES('Zink', 'mg', 10, 'S'); +INSERT INTO STOFF VALUES('Kupfer', 'ug', 1000, 'S'); +INSERT INTO STOFF VALUES('Mangan', 'mg', 2, 'S'); +INSERT INTO STOFF VALUES('Fluor', 'mg', 3.5, 'S'); +INSERT INTO STOFF VALUES('Selen', 'ug', 55, 'S'); +INSERT INTO STOFF VALUES('Chrom', 'ug', 40, 'S'); +INSERT INTO STOFF VALUES('Molybdän', 'ug', 50, 'S'); +INSERT INTO STOFF VALUES('Jod', 'ug', 150, 'S'); + +-- Carotinoide: +INSERT INTO STOFF VALUES('Lutein', 'mg', NULL, 'C'); -- bei Abtei ug +INSERT INTO STOFF VALUES('Lycopin', 'mg', NULL, 'C'); +INSERT INTO STOFF VALUES('Zeaxanthin', 'ug', NULL, 'C'); + +-- Aminosaeuren und Verbindungen: +INSERT INTO STOFF VALUES('L-Arginin', 'mg', NULL, 'A'); +INSERT INTO STOFF VALUES('L-Carnitin', 'mg', NULL, 'A'); + +-- Sonstiges: +INSERT INTO STOFF VALUES('Q10', 'mg', NULL, 'X'); +INSERT INTO STOFF VALUES('Cholin', 'mg', NULL, 'X'); +INSERT INTO STOFF VALUES('Isoflavone', 'mg', NULL, 'X'); + -- ============================================================================