A Question

Andrew Turner andrewturner512 at googlemail.com
Thu Dec 28 00:35:03 UTC 2006


Amarok's documentation has one advantage in that it's always up to
date. Unfortunately, the disadvantage is that it doesn't exist.

You can find things like the SQL to create the tables in
collectiondb.cpp (eg the function CollectionDB::createTables),
although it helps to have a knowledge of C++.

You can also explore the schema and perform queries using the sqlite
binaries from www.sqlite.org (you need to make sure you use their up
to date version, not your distro's, as it will frequently be old).
Amarok's database is stored at ~/.kde/share/apps/amarok/collection.db.

Andrew

On 28/12/06, stan <stanb at panix.com> wrote:
> On Wed, Dec 27, 2006 at 11:42:14PM +0000, Andrew Turner wrote:
> > Unfortunately, quite a lot of Amarok's database structure isn't
> > optimal. Maybe when work starts for Amarok 2 (to coincide with KDE 4),
> > or perhaps before, things can get a big redesign.
> >
> > At the moment, one reason that what you suggest isn't possible is that
> > while there is an album table which contains album names and ID
> > numbers, these albums aren't true albums, e.g. if you have two albums
> > called "The Best Of" by different artists, they will share the same
> > album ID. (In fact, it will likely be assumed to be a compilation
> > album and get shown under Various Artists). At the moment, this isn't
> > a problem, because almost everything is associated with each track, so
> > you can separate the two, even though they both share the same album
> > ID.
> >
> > Also, each track can have a different embedded image (within the
> > MP3/whatever file).
> >
>
> Thanks for the fast reply.
>
> Actaully I have a least one Artist who has released 2 albums by the same
> name :-(. Obviously, they key for the Albums table needs to have it's
> primary key composed of multiple coollumns, for instance artis, albumm
> name, and issue date come to mind as a posibility.
>
> Is there documentation on the backend database design? That's something I
> have a pretty good feel for, and I might be able to make some useful
> sugestions.
>
> All, in all, I'm thrilled by the program as is!
>
> --
> Unix is very simple, but it takes a genius to understand the simplicity.
> (Dennis Ritchie)
>



More information about the Amarok mailing list