Amarok Datenbank-Backend

Maximilian Kossick mkossick at gmx.de
Sat Sep 8 09:12:40 CEST 2007


Hi Tobias,
nice to hear that you want to help us optimize Amarok's DB usage.

A draft of the planned new SQL schema can be found in 
collection/sqlcollection/DatabaseUpdater.cpp. It only contains the tables 
necessary for sqlcollection, all other components of amarok will have to 
create their own tables (Nikolaj already does that for the services).

In my planned DB schema, the tags table was basically renamed to tracks. The 
other two major changes are the introduction of the url table (although i'm 
not quite convinced that we actually need it, I need to think about this some 
more) and a modification of the columns of the album table.

Unfortunately, the code in DatabaseUpdater.cpp is the only place I ever stored 
the database schema. eean asked me to create a diagram once, but I didn't 
find a good tool for it, and actually do not have a lot of time to spend on 
Amarok at the moment anyway:(

All database queries in sqlcollection still use the old database schema, but 
they will be ported at some point.

Cheers, Max

On Saturday 08 September 2007 you wrote:
> Hi Maximilian!
>
> Erlaube mir, mich kurz vorzustellen: Ich bin Tobias, Mathematik-Student an
> der FU Berlin und KDE-Enthusiast. Seit einer ganzen Weile mal habe ich
> immer schon nach einem Projekt gesucht, wo ich mit einer geringen
> Einstiegshürde anfangen kann, Code beizutragen, der auch akzeptabel ist und
> jetzt wollte ich das eben mal bei Amarok probieren :-)
> Gestern ging eine eMail von markey über die amarok-devel-Mailingliste, dass
> es wohl mit SQLite stellenweise Probleme bei der Performance gibt. Bei
> meinem früheren Arbeitgeber hab ich mich ziemlich viel mit Datenbanken
> herumgeschlagen, Oracle und PostgreSQL und hab unter anderem eine halbe
> Community-Plattform mit Stored Procedures in PostgreSQL geschrieben, hab
> daher auch ein wenig Erfahrung mit so Optimierung von SQL-Queries und hab
> mich also nach der oben erwähnten Mail gedacht, ich guck mir mal an, was
> ihr da so macht; vielleicht kann ich ja was helfen. In #amarok hat man mir
> gesagt, du seiest der Amarok-Datenbank-Guru und ich soll dich am besten
> direkt per Mail fragen, wenn ich was wissen will. Und da geht es auch schon
> los :-)
> In der collection/sqlcollection/sqlmeta.cpp, genauer
> SqlTrack::writeMetaDataToDb(), wird auf eine Tabelle 'tags' zugegriffen,
> die aber nirgendwo erkennbar erzeugt wird, jedenfalls nicht in
> DatabaseUpdater.cpp, sondern nur in der (überholten?) collectiondb.cpp. Ist
> das jetzt alles in der Tabelle 'tracks' drin oder fehlt da noch Code in
> DatabaseUpdater.cpp oder ist die oben genannte Funktion einfach noch nicht
> aktualisiert? Hast du irgendwie mal ein Schema von eurem Tabellenlayout zur
> Hand?
> Ich würd gerne, soweit praktisch möglich, versuchen, da was zu helfen, wenn
> ich das kann. Wenn dir irgendwas einfällt, was da noch gemacht werden muss,
> immer her damit :-)
>
> Bye
> Tobias


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/amarok-devel/attachments/20070908/a8b8b614/attachment.pgp 


More information about the Amarok-devel mailing list