larrettp;299626 Wrote: 
> Well, I've had a look at that Wiki as well and I still see the
> 'Many-to-Many' tables in there. The problem with these is that they
> have to be created and maintained, which takes time and slows down the
> scanning process. Also, when they are being read, they are very
> inefficient as they will be doing table scans and the larger the
> database, the longer it takes - exponentially!
> 
> By removing these and replacing them with indexes on the main tables,
> the creation I-O will, almost certainly, be reduced during scanning and
> the access paths will be vastly improved and oblivious to the size of
> the database.
> 
Do I understand you correctly that you are suggesting a single "tracks"
table that contains all information in the current database ?

Or are you just saying that the information that is in
"contributor_track" and "genre_track" should be moved into the "tracks"
table, but still keep the "albums", "genres" tables as separate tables
?

In my library this would result in increasing the number of rows in the
"tracks" table by three times, but I have a rather small library and
quite few tags, so in other users you might see an even larger
increase.
It would also result in that the information in the "tracks" table for
a single music file would be represented by several rows, since the
many to many, still has to be represented. The SqueezeCenter perl code
would need to handle this, which creates another complexity.

I understand that a "tracks" table which is 3 times larger might still
be faster than joining through the many to many tables that exists
today, assuming you have the correct indexes of course.

The big problem however is that this will also require a big change of
the SqueezeCenter code since it relies on the current data structure in
the database.

Just a stupid question, is relation databases really this bad at
representing relations ? I thought this was something they were
optimized for ? 
After all, if we aren't going to use the features of the relation
database, why use it at all ?


-- 
erland

Erland Isaksson
'My homepage' (http://erland.homeip.net) 'My download page'
(http://erland.homeip.net/download)
(Developer of 'TrackStat, SQLPlayList, DynamicPlayList, Custom Browse,
Custom Scan,  Custom Skip, Multi Library and Database Query plugins'
(http://wiki.erland.homeip.net/index.php/Category:SlimServer))
------------------------------------------------------------------------
erland's Profile: http://forums.slimdevices.com/member.php?userid=3124
View this thread: http://forums.slimdevices.com/showthread.php?t=45261

_______________________________________________
discuss mailing list
discuss@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/discuss

Reply via email to