started new Databse Schematic

This commit is contained in:
Lars Noack 2022-12-02 10:59:22 +01:00
parent 8e1fd8ba5e
commit ded2f7b529

View File

@ -12,20 +12,6 @@ CREATE TABLE Source
FOREIGN KEY(song_id) REFERENCES Song(id)
);
CREATE TABLE Target
(
id BIGINT AUTO_INCREMENT PRIMARY KEY,
song_id BIGINT,
FOREIGN KEY(song_id) REFERENCES Song(id)
);
CREATE TABLE Lyrics
(
id BIGINT AUTO_INCREMENT PRIMARY KEY,
song_id BIGINT,
FOREIGN KEY(song_id) REFERENCES Song(id)
);
CREATE TABLE Artist
(
id INTEGER AUTO_INCREMENT PRIMARY KEY,
@ -40,6 +26,23 @@ CREATE TABLE Album
FOREIGN KEY(song_id) REFERENCES Song(id)
);
CREATE TABLE Target
(
id BIGINT AUTO_INCREMENT PRIMARY KEY,
song_id BIGINT,
FOREIGN KEY(song_id) REFERENCES Song(id)
);
CREATE TABLE Lyrics
(
id BIGINT AUTO_INCREMENT PRIMARY KEY,
song_id BIGINT,
FOREIGN KEY(song_id) REFERENCES Song(id)
);
CREATE TABLE EasyId3
(
);
CREATE TABLE SongArtist
(
@ -56,3 +59,9 @@ CREATE TABLE AlbumArtist
FOREIGN KEY(album_id) REFERENCES Album(id),
FOREIGN KEY(artist_id) REFERENCES Artist(id)
);
SELECT
Song.id,
Song.name
FROM Song