Hi,
See previous topic: "media database , smartplaylists,albumtree etc"
The current schema I'm testing:
create table media (mediaid integer primary key,medianame character);
create table attr (attrid integer primary key,attrname character);
create table file (fileid integer primary key
,mediaid integer default 0,dirid integer default null
,filename character,mtime integer default null
,url character unique,removable integer default 0,title character);
create index ix_file_dirid on file (dirid);
insert into file (fileid,dirid,filename,title,url)
values(0,null,'','Root','file:///');
create table file_attr (fileid integer,mediaid integer,attrid
integer,value character);
create unique index ix_file_attr on file_attr (fileid,attrid);
create index ix_file_attr_media_val on file_attr (mediaid,attrid,value);
/*
note that unique and primary fields create an (invisible) index.
dirid = fileid of parent directory.
mediaid = {0:dir,1:image,etc..}
*/
Response to Tack and the directory table:
I really tried to use a directory table but I just could not get it
SIMPLE enough.
The advantages you talked about don't work if a directory has subdirectories.
in that case all subdirectory's should be renamed too at a remount or dir-move.
The beautiful/non redundant way would be to discard the url field alltogether.
But that would not be simple or fast.
url is an index field,by recusively searching using dirid+filename it
would be possible to recreate the url field.
same for removable.
Martijn.
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
Freevo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-devel