Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions day1.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
REATE TABLE album (
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(128) NOT NULL,
release_year INTEGER
);
CREATE TABLE artist (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(128) NOT NULL
);
CREATE TABLE track (
id INTEGER PRIMARY KEY AUTOINCREMENT,
title VARCHAR(128) NOT NULL,
album_id INT REFERENCES album(id)
);
CREATE TABLE artist_album (
artist_id INT REFERENCES artist(id),
album_id INT REFERENCES album(id)
);
Binary file added mydatabase.db
Binary file not shown.
12 changes: 12 additions & 0 deletions note.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
INSERT INTO author (name) VALUES ('Brandon Hopper');
INSERT INTO author (name) VALUES ('Dj Hopper');
INSERT INTO author (name) VALUES ('Bailey Hopper');

INSERT INTO note (content, author_id) VALUES ('This is a note with some content to it', 2);
INSERT INTO note (content, author_id) VALUES ('This is note is new and it is with some new content to it', 2);

INSERT INTO note (content, author_id) VALUES ('This is some note with some content to it', 3);

INSERT INTO note (content, author_id) VALUES ('This is one note with some content to it', 1);
INSERT INTO note (content, author_id) VALUES ('This is a new note with some content to it', 1);
INSERT INTO note (content, author_id) VALUES ('This is a another note with some content to it', 1);