Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

make a db appear as an xml file?

Status
Not open for further replies.

jez

Programmer
Apr 24, 2001
370
VN
Not sure if this is possible, but does anyone know where i might find some resources to make a db appear as an xml file on a unix system.

I think i need the xml to be a symlink to some kind of interface or api.. but thats as far as i have got...

Any ideas?

Thanks.
 
No, that is exactly NOT what i want to do. :)

There is an application that uses an XML file.
I want to replace that xml file with a database, but leave the application thinking that it is just using the same xml file.

I have done some more research and it seems i need to use some form of database view.
 
Now I see the idea.

What DB are you planning to use? Can you modify the application?

Cheers,
Dian
 
SQLite, and no i cannot modify the application (without getting into legal trouble - its an apple app).

But... the xml is a very standard xml file, it is an Apple Plist format, which is used throughout Apple applications to store preferences and data.

I dont think it will be too difficult to make a symlink file to the database interface so the app would see the expected xml file. The tricky bit (from my point of view) is designing a view that is like an xml file.

I am currently reading up on xml databases, rather than xml enabled databases.

 
Well, good luck and keep us informed. At the moment I can't see a way to get what you need.

Another option would be keeping the info in the database and export it to the XML file, but maybe that doesn't fit you needs.

Cheers,
Dian
 
Well, i guess sharing the plan is not a problem... basically i find iTunes stops being efficient after you pass about 5000 tunes (or records).

Initially i wrote a perl script to find duplicates by checksum of the files. To make that work well i added sqlite, mainly to try it out and to use database comparison techniques on a large dataset.

Now i have an sqlite db with all the data about my music collection in it, along with checksums of each file.
I figured it would be cool if i could make iTunes use my database instead of it's own pList xml file.

I will certainly post any success i have (and since it will be mostly based on open source code) i will likely make it available to others.


Thanks for your input, much appreciated.
 
You're welcome, but I'd still consider the idea on keeping the database and import/export data as XML to make iTunes works instead making it directly against the DB.

Cheers,
Dian
 
Yes i think you might be right... I could do it that way initially to show the idea and then maybe get some help with the interface bit.

The main reason i have against the xml is that it is a large file and i think that the inefficiency of itunes is dealing with a large file as it is all in memory.

The other reason was the duplicates. A database is great for finding duplicates and if i have the file checksum then it should find dupes even with different file names.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top