Database format changed

This forum is for questions / discussions regarding development of addons / tweaks for MediaMonkey for Windows 4.

Moderators: Gurus, Addon Administrators

Geeno

Database format changed

Post 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:')
Bex
Posts: 6316
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

Post 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
Last edited by Bex on Wed Apr 04, 2007 8:26 am, edited 1 time in total.
Advanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!

All My Scripts
onkel_enno
Posts: 2153
Joined: Fri Jan 14, 2005 1:45 am
Location: Germany
Contact:

Post 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.
Bex
Posts: 6316
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

Post by Bex »

Onkel_enno!
I never got the damn ODBC driver to work correctly. It only linked some tables...
How did you do it?
Advanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!

All My Scripts
onkel_enno
Posts: 2153
Joined: Fri Jan 14, 2005 1:45 am
Location: Germany
Contact:

Post 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:
Geeno

Post 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.
Geeno

DB difficulties

Post 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.
Bex
Posts: 6316
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

Post 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
Advanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!

All My Scripts
Teknojnky
Posts: 5537
Joined: Tue Sep 06, 2005 11:01 pm
Contact:

Post 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.
onkel_enno
Posts: 2153
Joined: Fri Jan 14, 2005 1:45 am
Location: Germany
Contact:

Re: DB difficulties

Post 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???
Geeno

SQLite problems

Post 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.
jiri
Posts: 5417
Joined: Tue Aug 14, 2001 7:00 pm
Location: Czech Republic
Contact:

Post 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
Geeno
Posts: 4
Joined: Thu Apr 05, 2007 4:31 am

Post 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.
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post 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?
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
Mizery_Made
Posts: 2283
Joined: Tue Aug 29, 2006 1:09 pm
Location: Kansas City, Missouri, United States

Post 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.
Post Reply