Martijn Voncken wrote: > On 6/1/05, Martijn Voncken <[EMAIL PROTECTED]> wrote: >> I'm willing to change to a design with EMPTY hybrid tables. >> *It will really speed up initial development. (compared to full hybrid >> right away) >> *common api's will remain the same. >> *if testing/application requires more performance,a switch to hybrid >> is still possible. > > Hi, > The current (still changing) sqlite schema i'm experimenting with. > A full attr,value schema without hybrid tables. > > create table attr (attrid integer primary key,attrname character) > insert into attr values (1,'dirpath') > insert into attr values (2,'dirtitle') > > create table media (mediaid integer primary key,medianame character) > insert into media values (0,'audio') > insert into media values (1,'video') > insert into media values (2,'image') > insert into media values (3,'misc') > > create table file (fileid integer primary key > ,mediaid integer,path character,mtime integer) > create index ix_file_path on file (path) > > 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) > --- > I chose integer-id/indexes because they perform better on most databases. > Optimized for current media-db use +searching on attribute-value per media. > > I have still to design/decide what to do with directory's > -i need at least an mtime per dir. > -perhaps even a 1'st class table for directory's > -directory's need attributes too.
Without understanding what you do and why (my db knowledge is close to zero, so do what you think is fast and good), a dir is not only something with items, it is also an item itself in the parent dir (except the root dir). Also keep in mind: discs may change the mount point (more than one drive), playlists also contain files (the same as the dir, not an extra entry) and stuff like that Dischi -- printk("VFS: Busy inodes after unmount. " "Self-destruct in 5 seconds. Have a nice day...\n"); 2.3.99-pre8 /usr/src/linux/fs/super.c
pgpGBD1J95RpZ.pgp
Description: PGP signature