PDA

View Full Version : XML Database: eXist



Lykurg
4th March 2007, 13:43
Hi,

has someone here already made experiences with XML databases like eXist (http://exist-db.org/) (or any other) in conjunction with Qt?
Which XML database do you prefer and do you know a HowTo/tutorial for Qt with XML databases?


Thanks
Lykurg

patrik08
6th March 2007, 01:28
Hi,
has someone here already made experiences with XML databases like eXist (http://exist-db.org/) (or any other) in conjunction with Qt?
Which XML database do you prefer and do you know a HowTo/tutorial for Qt with XML databases?
Thanks
Lykurg

I tested IBM DB2 http://www-306.ibm.com/software/data/db2/express/ && odbc on qt ... running nice ..... but to my work on qt client xslt from gnome ( http://xmlsoft.org/XSLT/ ) make it a good job.... to generate PDF latex html ecc...
and running on all OS.... have a look on http://sourceforge.net/projects/visual-xsltproc/ && on server apache I transform xml in a tool name popoon http://www.popoon.org/ generate PDF on the fly Apache FOP http://xmlgraphics.apache.org/fop/ word , openoffice && xhtml....
xslt is the fasted query ..... :)

If you save on mysql xml file is faster as DB2 express....

You must only read file && encodeBase64(file stream) and save to longblob field .... on this way you can save 2GB file....



/* encode to name */
QString encodeBase64( QString xml )
{
QByteArray text;
text.append(xml);
return text.toBase64();
}

/* decode to name */
QString decodeBase64( QString xml )
{
QByteArray xcode("");;
xcode.append(xml);
QByteArray precode(QByteArray::fromBase64(xcode));
QString notetxt = precode.data();
return notetxt;
}

Lykurg
6th March 2007, 13:30
Hi patrik08,

thanks for your advice to DB2 Express-C. It looks interesting, but because I am a really novice to the whole database stuff, I have some litte questions:

a) Can DB2 Express-C be used like SQLite: embedded and with no configuration? (It looks to me that not. So if I use it, must my Programm inherit the 375 MB exe file from the download site?)

b) I have looked in your project sources but not find the relating lines of code. Can you just tell me in which files the essential code relating to DB2 are.

c) Are the license conditions DB2 Express-C in priciple like LGPL, so that DB2 Express-C can also be used in closed-source applications?


Thanks,

Lykurg

patrik08
6th March 2007, 23:22
Hi patrik08,

thanks for your advice to DB2 Express-C. It looks interesting, but because I am a really novice to the whole database stuff, I have some litte questions:

a) Can DB2 Express-C be used like SQLite: embedded and with no configuration? (It looks to me that not. So if I use it, must my Programm inherit the 375 MB exe file from the download site?)

No.... DB2 is like Oracle or Mysql .... is not a static db file like sqlite2/3
But you can access over your static lib on a class on the same method from:
http://visual-xsltproc.svn.sourceforge.net/viewvc/visual-xsltproc/v-xsltproc/src_xslt/c_sqlite/sqlitedb.cpp?view=markup
&&
http://visual-xsltproc.svn.sourceforge.net/viewvc/visual-xsltproc/v-xsltproc/src_xslt/c_sqlite/sqlitedb.h?view=markup
http://www.redbooks.ibm.com/redbooks/pdfs/sg247301.pdf chapter 4 note have a look
to php to && c++ odbc can handle your data ......

If you like to attach a db to apps ... have a look on .... http://quazip.sourceforge.net/
Easy to use ... http://www.qtforum.de/forum/viewtopic.php?t=3375 ...
You can make it all to xml && zip ... and explode on Install or first runn....

If you can work on xslt .... db is not needet.... for only 300MB data....




b) I have looked in your project sources but not find the relating lines of code. Can you just tell me in which files the essential code relating to DB2 are.



I say i have access DB2 on odbc on qt and running nice....
http://qtexcel-xslt.svn.sourceforge.net/viewvc/qtexcel-xslt/_odbc_wizard/
this is a tool to export dbs on xml && mysql .. && csv http://en.wikipedia.org/wiki/Comma-separated_values

I put source to Subversion to download ... on download section you find only the minimal...







c) Are the license conditions DB2 Express-C in priciple like LGPL, so that DB2 Express-C can also be used in closed-source applications?
Lykurg

I don know ... all IT Paper & magazine say OpenSource ....
I not find license on http://www-306.ibm.com/software/data/db2/ i buy a php magazine && inside this db2 express CD ... and i install easy on linux... now i have mysql & db2 running on the same server....