Skip to content

Commit

Permalink
Sql_update
Browse files Browse the repository at this point in the history
  • Loading branch information
fifthaccess committed Feb 14, 2022
1 parent 1a3b0c1 commit afdd7a9
Showing 1 changed file with 26 additions and 9 deletions.
35 changes: 26 additions & 9 deletions db/createDb.sql
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
/*create database if not exists Projekt_06;
create database if not exists Projekt_06;
use Projekt_06;

create table if not exists Künstler (
KünstlerId int auto_increment unique key primary key,
Gehalt int (40),
Herkunftsland varchar (40),
Vorname varchar (40),
Nachname varchar (40)
);
create table if not exists Lied_Künstler
(
Id int auto_increment unique key primary key,
kÜnstlerId int (40),
LiedId int (40)
);
create table if not exists Lied (
LiedId int auto_increment unique key primary key,
Künsterzahl int (40),
Expand All @@ -24,3 +22,22 @@ create table if not exists Manager (
Firma varchar (40),
Künstler_anzahl int (40)
);

create table if not exists Lied_Künstler
(
Id int auto_increment unique key primary key,
KünstlerId int (40),
LiedId int (40),
constraint KünstlerForeignKey foreign key (KünstlerId) references Künstler (KünstlerId),
constraint LiedForeignKey foreign key (LiedId) references Lied (LiedId)
);

create table if not exists Künstler (
KünstlerId int auto_increment unique key primary key,
Gehalt int (40),
Herkunftsland varchar (40),
Vorname varchar (40),
Nachname varchar (40),
ManagerId int (40),
constraint mangerForeignKey foreign key (ManagerId) references Manager (ManagerId)
);

0 comments on commit afdd7a9

Please sign in to comment.