summaryrefslogtreecommitdiff
path: root/dbschema.sql
diff options
context:
space:
mode:
authorUlf Lilleengen <lulf@carrot.studby.ntnu.no>2008-08-03 18:10:38 +0200
committerUlf Lilleengen <lulf@carrot.studby.ntnu.no>2008-08-03 18:10:38 +0200
commitbd55a14447d53fef7e50797ed830b2d12f8ad334 (patch)
tree32d61303b78c69fc7b2b6ca03e307674eefa9026 /dbschema.sql
parentacbf5536ee7b226c9126428bfe67ae5a34509e6f (diff)
- Initial implementation of sqlite3 as backend for music.
- Add current database schema. - Remove old query support, since this is replaced by sqlite now.
Diffstat (limited to 'dbschema.sql')
-rw-r--r--dbschema.sql21
1 files changed, 21 insertions, 0 deletions
diff --git a/dbschema.sql b/dbschema.sql
new file mode 100644
index 0000000..b46aa88
--- /dev/null
+++ b/dbschema.sql
@@ -0,0 +1,21 @@
+-- Could have saved two table here. But having them avoids redundancy as well as
+-- make it possible for future enhancements.
+
+CREATE TABLE artist (
+ name varchar(200) NOT NULL,
+ PRIMARY KEY(name)
+);
+
+CREATE TABLE song (
+ title varchar(200) NOT NULL,
+ album varchar(200),
+ artistname varchar(200),
+ genrename varchar(200),
+ year int,
+ PRIMARY KEY(title, artistname, year)
+);
+
+CREATE TABLE genre (
+ name varchar(200) NOT NULL,
+ PRIMARY KEY(name)
+)