From 143874af78c98b5d7189cad0c409a713d40267a0 Mon Sep 17 00:00:00 2001 From: Simon Date: Wed, 11 Jan 2023 14:36:18 +0100 Subject: [PATCH] add: Ein paar Kommentare bei der DB --- BancaDati.sql | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/BancaDati.sql b/BancaDati.sql index 6c422bc..24b16c9 100644 --- a/BancaDati.sql +++ b/BancaDati.sql @@ -56,25 +56,25 @@ CREATE TABLE `utenteElenco` `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -ALTER TABLE `ingredienti` +ALTER TABLE `ingredienti` /*Zutaten*/ ADD PRIMARY KEY (`id`); -ALTER TABLE `folla` +ALTER TABLE `folla` /*Menge*/ ADD PRIMARY KEY (`id`); -ALTER TABLE `elenco` +ALTER TABLE `elenco` /*Liste*/ ADD PRIMARY KEY (`id`); -ALTER TABLE `utente` +ALTER TABLE `utente` /*Benutzer*/ ADD PRIMARY KEY (`id`); -ALTER TABLE `elencoIngredienti` +ALTER TABLE `elencoIngredienti` /*Liste_Zutaten*/ ADD PRIMARY KEY (`id`), ADD CONSTRAINT `FK_ElencoIngredienti_Ingredienti` FOREIGN KEY (`ingredientiID`) REFERENCES `ingredienti`(`id`), /*Liste_Zutaten hat Foreignkey von Zutaten(id)*/ ADD CONSTRAINT `FK_ElencoIngredienti_Elenco` FOREIGN KEY (`elencoID`) REFERENCES `elenco`(`id`), /*Liste_Zutaten hat Foreignkey von Liste(id)*/ ADD CONSTRAINT `FK_ElencoIngredienti_Folla` FOREIGN KEY (`follaID`) REFERENCES `folla`(`id`); /*Liste_Zutaten hat Foreignkey von Menge(id)*/ -ALTER TABLE `utenteElenco` +ALTER TABLE `utenteElenco` /*Benutzer_Liste*/ ADD PRIMARY KEY (`id`), ADD CONSTRAINT `FK_UtenteElenco_Utente` FOREIGN KEY (`utenteId`) REFERENCES `utente`(`id`), /*Benutzer_Liste hat Foreignkey von Benutzer(id)*/ ADD CONSTRAINT `FK_UtenteElenco_Elenco` FOREIGN KEY (`elencoId`) REFERENCES `elenco`(`id`); /*Benutzer_Liste hat Foreignkey von Liste(id)*/