view audacious/library/schema.sqlite @ 1534:02ce15d47ce1 trunk

[svn] - configure dialog for libnotify plugin
author giacomo
date Tue, 08 Aug 2006 09:13:41 -0700
parents 3cbe3d14ea68
children
line wrap: on
line source

--- (C) GPL 2006 Audacious Team
--- $Id: schema.sqlite 1780 2006-07-28 05:14:12Z 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,
	`media_filepath` LONGTEXT NOT NULL,
	`media_filename` LONGTEXT 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.