# HG changeset patch # User nenolod # Date 1154063006 25200 # Node ID 3435812f3e7fef14db5d1d8b03398ed88869321c # Parent 8b4232e681d781f9ccf28ad4b11d9c829977cd8d [svn] - add schema diff -r 8b4232e681d7 -r 3435812f3e7f ChangeLog --- 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 + revision [1776] + - add library/ (and base Makefile for libmedialibrary.a, schema.sqlite) + + + Changes: Modified: + + 2006-07-25 19:12:29 +0000 William Pitcock revision [1774] via Christian Birchinger : diff -r 8b4232e681d7 -r 3435812f3e7f audacious/library/schema.sqlite --- /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.