changeset 1432:3435812f3e7f trunk

[svn] - add schema
author nenolod
date Thu, 27 Jul 2006 22:03:26 -0700
parents 8b4232e681d7
children 3cbe3d14ea68
files ChangeLog audacious/library/schema.sqlite
diffstat 2 files changed, 52 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Jul 27 21:49:12 2006 -0700
+++ b/ChangeLog	Thu Jul 27 22:03:26 2006 -0700
@@ -1,3 +1,11 @@
+2006-07-28 04:49:12 +0000  William Pitcock <nenolod@nenolod.net>
+  revision [1776]
+  - add library/ (and base Makefile for libmedialibrary.a, schema.sqlite)
+  
+
+  Changes:        Modified:
+
+
 2006-07-25 19:12:29 +0000  William Pitcock <nenolod@nenolod.net>
   revision [1774]
   via Christian Birchinger <joker -at- netswarm.net>:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/audacious/library/schema.sqlite	Thu Jul 27 22:03:26 2006 -0700
@@ -0,0 +1,44 @@
+--- (C) GPL 2006 Audacious Team
+--- $Id: schema.sqlite 1778 2006-07-28 05:03:26Z nenolod $
+
+--- Artists table
+--- Albums (which songs belong to) belong to an Artist.
+CREATE TABLE IF NOT EXISTS `artists` (
+	`id` INT NOT NULL,
+	`artist_name` LONGTEXT NOT NULL
+);
+
+--- Album table
+--- Albums belong to an Artist and contain Songs, as described
+--- by the media table.
+CREATE TABLE IF NOT EXISTS `albums` (
+	`id` INT NOT NULL,
+	`artist_id` INT NOT NULL,
+	`album_name` LONGTEXT NOT NULL
+);
+
+--- Media table
+--- Media belongs to both an Artist entry and an Album entry,
+--- but the distinction of Artist::Song is indirect, via
+--- the relation of Artist::Album, Album::Song.
+---
+--- This theoretically results in a more tidied index being generated by
+--- the SQLite engine.
+CREATE TABLE IF NOT EXISTS `media` (
+	`id` INT NOT NULL,
+	`album_id` INT NOT NULL,
+	`media_title` LONGTEXT NOT NULL,
+	`media_genre` LONGTEXT NOT NULL,
+	`media_length` INT NOT NULL,
+	`media_year` INT NOT NULL
+);
+	
+--- Tags table
+--- Associates keywords with media entries, via Media::id.
+CREATE TABLE IF NOT EXISTS `tags` (
+	`id` INT NOT NULL,
+	`media_id` INT NOT NULL,
+	`media_keyword` LONGTEXT NOT NULL
+);
+
+--- End of schema.