Database format changed

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

Moderator: Gurus

Database format changed

Postby Geeno » Wed Apr 04, 2007 5:51 am

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:')
Geeno
 

Postby Bex » Wed Apr 04, 2007 7:49 am

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

Postby onkel_enno » Wed Apr 04, 2007 8:14 am

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.
SansaMonkey - for SanDisk Sansa and Rockbox Users

Please no PMs for Questions which should be asked in the Forum. Thx
onkel_enno
 
Posts: 2139
Joined: Fri Jan 14, 2005 1:45 am
Location: Germany

Postby Bex » Wed Apr 04, 2007 8:28 am

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

Postby onkel_enno » Wed Apr 04, 2007 8:39 am

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:
SansaMonkey - for SanDisk Sansa and Rockbox Users

Please no PMs for Questions which should be asked in the Forum. Thx
onkel_enno
 
Posts: 2139
Joined: Fri Jan 14, 2005 1:45 am
Location: Germany

Postby Geeno » Wed Apr 04, 2007 8:43 am

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

Postby Geeno » Wed Apr 04, 2007 10:12 am

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

Postby Bex » Wed Apr 04, 2007 10:15 am

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

Postby Teknojnky » Wed Apr 04, 2007 10:36 am

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.
Teknojnky
 
Posts: 5509
Joined: Tue Sep 06, 2005 11:01 pm

Re: DB difficulties

Postby onkel_enno » Wed Apr 04, 2007 11:00 am

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???
SansaMonkey - for SanDisk Sansa and Rockbox Users

Please no PMs for Questions which should be asked in the Forum. Thx
onkel_enno
 
Posts: 2139
Joined: Fri Jan 14, 2005 1:45 am
Location: Germany

SQLite problems

Postby Geeno » Thu Apr 05, 2007 4:22 am

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

Postby jiri » Thu Apr 05, 2007 5:27 am

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

Postby Geeno » Thu Apr 05, 2007 7:16 am

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

Postby trixmoto » Thu Apr 05, 2007 9:34 am

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 trixmoto.net. If you're interested, check out my Uniface blog.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.

Image Image
trixmoto
 
Posts: 9948
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK

Postby Mizery_Made » Thu Apr 05, 2007 10:09 am

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.
Mizery_Made
 
Posts: 2258
Joined: Tue Aug 29, 2006 1:09 pm
Location: Kansas City, Missouri, United States

Next

Return to Addons developer forum

Who is online

Users browsing this forum: No registered users and 2 guests