Re: Generalized rather than just CD

Robin O'Leary (cdindex nospam at ro.nu)
Fri, 10 Dec 1999 02:06:59 +0000

On Thu, Dec 09, 1999 at 02:25:12PM -0800, robert nospam at moon.eorbit.net wrote:
> For instance, right now we have a SHA1 key for every CD, which contains
> multiple tracks.
Would it be more accurate to say that we have at least one SHA1 key for
every CD?

> An MP3 typically is only one track, so do you refer to
> an MP3 of track 3 of a given CD as ivDFb2Tw6HzN.XdYZFj5zr1Q9EY-:3 or do
> you give it a seperate id?
If you need to refer to it from external database records, you have to
give it a separate ID. That ID needn't be a hash, just so long as it
is unique. It could be a picoseond-accurate timestamp of when the record
was created, or allocated from a pool by an ID server, or a random number,
whatever.

This goes back to the early discussions we had about data representations
of things musical. The most general way to do (and the most appealing to
me) it is to have separate database entities for all the little pieces,
physical or notional (tracks, artists, songs, performers, titles etc),
and link them all together with a mass of relations. At the moment,
cdindex has tracks stored as a sub-element of a CD and lacks many of
the other entities that would make such a relational scheme sensible.
But as time goes by, more of these fields can be promoted to being
entities in their own right, replaced in the CD structure with links.

It isn't currently possible to express the fact that copies of one
track might exist on several different CDs. I should think this would
be a good first candidate to start separating out pieces of the database.

> Also, there are MP3s that have never been on a CD, so how do you come up
> with a meaningful SHA1 key? Random data which then gets hashed? The
> title of the track?
It would be nice to have a mechanical way to identify the track, but
until we do, it'll have to be some random key. Once we have a thing
in the database representing the track, we can hang as many recognition
mechanisms off it as we can dream up.

Robin.

-- 
R.M.O'Leary <cdindex nospam at ro.nu> +44 7010 7070 44, PO Box 20, Swansea SA2 8YB, UK