Page 1 of 4

Database format changed

Posted: Wed Apr 04, 2007 5:51 am
by Geeno
The database used by MM does not seem to be a MS Access Database anymore.
This was very handy for me, because I used a simple update query to move the path of all tracks to a different directory or disk when I moved my music collection.
Now I am forced to leave it where it is or to rebuild the database each time, which is unpractical.
Could you please add a functionality that lets one move all tracks that share a common path root to a new root (e.g. C: to D:, C:\my_music to K:\her_music)?

Thank you.

Just a note: the new way of browsing with the covers displayed next to the tracks is great. javascript:emoticon(':lol:')
javascript:emoticon(':lol:')

Posted: Wed Apr 04, 2007 7:49 am
by Bex
That's correct. MM3 is using SQLite instead of MS Access which gives a lot of advantages. The downside is that you cant use Access to query the DB anymore but there are other tools which let you do almost the same thing.
Read more here:
http://www.mediamonkey.com/forum/viewtopic.php?t=15449

Posted: Wed Apr 04, 2007 8:14 am
by onkel_enno
There is also a ODBC Driver for SQLite available, so that you can use the Tables in Access too, but still it's not really possible to update data, because MM uses a self created collation which isn't available outside MM.

That's why I didn't switch to MM3. Had no time to figure out how to use the SQLite-DB.

Posted: Wed Apr 04, 2007 8:28 am
by Bex
Onkel_enno!
I never got the damn ODBC driver to work correctly. It only linked some tables...
How did you do it?

Posted: Wed Apr 04, 2007 8:39 am
by onkel_enno
Hmm, you are right. I thought I got all tables to work, but that was some weeks ago :roll:
It's that damn Collation-Thing that causes the error. :evil:

Posted: Wed Apr 04, 2007 8:43 am
by Geeno
Thanks Bex.
I suppose it's time to learn how to use yet another tool.
I'm gonna download it right now.

But, does nobody else move his whole collection around?

For one, I keep it on an USB disk that I carry around AND on my PC at home and I usually keep them in sync by copying everything with robocopy and then updating the db with a query I stored in it.

It works, but I wonder if this is not a frequent enough operation to have it in MM itself.

DB difficulties

Posted: Wed Apr 04, 2007 10:12 am
by Geeno
Hello, Bex.

I download and installed some SQLite front-ends.
Now I can query the MM database, but so far I had no success executing my update queries.

I tried a simple query, like "UPDATE Songs SET IdMedia=4" (to change the root disk), but I get the error "no such collation sequence: IUNICODE".

I'm sure it is something simple to fix, but being a complete novice to SQLite, I'm stuck.

Can you please help?
I know this is more than a bit OT here, and I apologize for that.

Posted: Wed Apr 04, 2007 10:15 am
by Bex
I haven't yet tried to make any update statements in SQLite so I really don't know. But here's some more info on the subject.
http://www.mediamonkey.com/forum/viewto ... t=iunicode

Posted: Wed Apr 04, 2007 10:36 am
by Teknojnky
I know alot of interest in digging into the new database, but perhaps some patience is needed while the dev's get the structure finalized before spending too much effort on.

I am sure they will make available the necessary information once things are finalized.

Re: DB difficulties

Posted: Wed Apr 04, 2007 11:00 am
by onkel_enno
Geeno wrote:Now I can query the MM database, but so far I had no success executing my update queries.

I tried a simple query, like "UPDATE Songs SET IdMedia=4" (to change the root disk), but I get the error "no such collation sequence: IUNICODE".

I'm sure it is something simple to fix, but being a complete novice to SQLite, I'm stuck.
Have you read my post???

SQLite problems

Posted: Thu Apr 05, 2007 4:22 am
by Geeno
onkel_enno: if you mean your post in this thread, I thought it was related to ODBC and ignored it.

Now I read the post Bex pointed me to (thank you Bex), and I understand that SQLite can use custom collations that must be defined through the API, i.e. they cannot be defined using a db front-end such as SQLite Expert or whatever.

If this is the case, it means that if one wants to write some simple stuff to manipulate the database, he/she's out of luck.

For me, I like MediaMonkey a lot, I write software for a living, but I don't think I'm going to learn a new development environment just to fix some field here and there in my music collection.

Posted: Thu Apr 05, 2007 5:27 am
by jiri
I certainly don't like the fact that currently the DB can't be easily modified outside MM. However, SQLite doesn't have good collation included, there's absolutely no support for Unicode sorting or case insensitive comparisons. We will try to do something about it, but to be honest, I don't know if there's any easy fix...

Jiri

Posted: Thu Apr 05, 2007 7:16 am
by Geeno
Jiri, as far as I know, most software companies don't like customers to mess with their application database at all, and they would rather use good old custom format files were it not so much easier to use a database.

So your comment stating that you don't like users being unable to tamper with the MM database is surely welcome.

As I said earlier, I would be more than satisfied if there was a way to move all songs to a new disk/root path in one fell swoop, but now I understand that a lot of users like to manipulate the database contents.

So please, even assuming that SQLite is far superior to MS Access, don't lock us out of the database.

Posted: Thu Apr 05, 2007 9:34 am
by trixmoto
jiri wrote:SQLite doesn't have good collation included, there's absolutely no support for Unicode sorting or case insensitive comparisons.
So why is MM3 using it? What are the benefits?

Posted: Thu Apr 05, 2007 10:09 am
by Mizery_Made
trixmoto wrote:So why is MM3 using it? What are the benefits?
Wasn't it said that it's faster? But honestly, Speed over Functionality isn't a good move, then again I know nothing about it so, those things listed hinder functionality... right? Lol.