diff --git a/komponist_innen.sql b/composer.sql similarity index 70% rename from komponist_innen.sql rename to composer.sql index 3ed8ce0..e4cc265 100644 --- a/komponist_innen.sql +++ b/composer.sql @@ -1,4 +1,4 @@ -INSERT INTO Komponist_in (id, Vorname, Name, Geburtsdatum, Sterbedatum) +INSERT INTO composer (id, Vorname, Name, Geburtsdatum, Sterbedatum) VALUES (1, "Johann Sebastian", "Bach", 16850331, 17500728), (2, "Ludwig van", "Beethoven", 17701217, 18270326), @@ -7,7 +7,7 @@ VALUES (5, "Robert", "Schumann", 18100608, 18560729) ; -INSERT INTO Komponist_in (id, Vorname, Name, Geburtsdatum, Sterbedatum) +INSERT INTO composer (id, Vorname, Name, Geburtsdatum, Sterbedatum) VALUES (6, 'Felix', 'Mendelssohn Bartholdy', 18090203, 18471104) ; diff --git a/rep_cli.py b/rep_cli.py index a441f9a..6c2017d 100644 --- a/rep_cli.py +++ b/rep_cli.py @@ -93,7 +93,7 @@ class Werk_unter_id: sql_comp = f""" SELECT Vorname, Name - FROM Komponist_in + FROM composer WHERE id = {self.values['Komp_id']} """ werk_comp = self.reader.execute(sql_comp).fetchone() diff --git a/repertoire.sql b/repertoire.sql index 4f532bf..a3d7578 100644 --- a/repertoire.sql +++ b/repertoire.sql @@ -1,4 +1,4 @@ -CREATE TABLE Komponist_in ( +CREATE TABLE composer ( id INTEGER NOT NULL PRIMARY KEY, Vorname VARCHAR(255) NOT NULL, Name VARCHAR(255) NOT NULL, @@ -18,7 +18,7 @@ CREATE TABLE Werk ( Aliasname VARCHAR(127), Werkverzeichnis VARCHAR(31), Werkverzeichnisnummer VARCHAR(15), - FOREIGN KEY(Komp_id) REFERENCES Komponist_in(id) + FOREIGN KEY(Komp_id) REFERENCES composer(id) ); CREATE TABLE Satz (