[prev in list] [next in list] [prev in thread] [next in thread] 

List:       amarok-devel
Subject:    Re: start of new DB design
From:       Maximilian Kossick <mkossick () gmx ! de>
Date:       2007-06-06 10:45:54
Message-ID: 200706061245.58935.mkossick () gmx ! de
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Wednesday 06 June 2007, Ian Monroe wrote:
> Attached is my first crack at redesigning the database for Amarok 2.0.
> I used the demo version of theKompany.com's Data Architect (though it
> has no limitations that I could see) to do it. Its not the best piece
> of software, but at least it doesn't start going wacky like
> Umbrello...
>
> Known problem: currently the 'trackid' primary key is in the 'urls'
> table, which is why everything is pointed to it. It makes more sense
> to put it in the 'tracks' table, since thats where all the info is.
>
> I added a playlistcurrent table, and a set of tables to handle
> undo/redo. There are two types of tracks that can be in a playlist,
> those that are part of the collection and those that are not. So
> either trackid or externalid in playcurrent goes unused (externalid is
> a FK for the PK of playlistexternal, I just noticed the latter is
> missing.) This creates more complications in the undo/redo system.
>
> Any other ideas on how to handle that?

And another idea: you could remove the distinction between trackid and 
externalid in the table if you'd just store the urls (as returned by 
Track::url(). The method is designed for cases like this. ) in the table. 
That way we could easily handle multiple SQL collections (i'm not sure if we 
want to add this functionality) and it would make the code a lot easier.
As pseudo-code:

load all urls from the current playlist table
for each url
{
	call CollectionManager:::trackForUrl
	if result of trackForUrl != 0
		insert track into playlist
	else
		create and insert proxy
}

> Other then that, I'm looking for some general feedback on what people
> think of it. I left podcast stuff alone, I'm not sure if people think
> it needs some work or not. Amazon is fine and simple as it is.
>
> Peace,
> Ian Monroe



["signature.asc" (application/pgp-signature)]

_______________________________________________
Amarok-devel mailing list
Amarok-devel@kde.org
https://mail.kde.org/mailman/listinfo/amarok-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic