| Forum List • Thread List • Refresh • New Topic • Search • Previous • Next 1 | 1. Lightweight database #3162 Posted by: 2004-01-01 20:12:11 | Well, I'm searching for a low size, low mem usage, low in everything, but high in speed database to use in wxWindows... Right now I opted for SQLite with the wxSQLite class...
But there is 1 major drawback. My application needs to be working in UNICODE... And SQLite does not support it, nor there seems to be anything to be found which can make it UNICODE.
So my question is twoways... I can change the SQLite database 'engine' to understand UTF8, but how would I need to work in wxWindows then (to pass my queries in UTF8 instead of UNICODE?)
The other side of my question is: is there somewhere on the net something else which can be used as a database with a simple interface (open, execute, close ...) and that supports UNICODE and has a good performance (I was thinking about XML, but I dont' know where to start...)
Thanks!
PS: Happy newyear ( from white (it has snowed on the 1st day!!) Belgium ;) ) | 2. Re: Lightweight database #3165 Posted by: upCASE 2004-01-01 23:42:43 | Hi! Well, I'm not really sure, but maybe have a look at the wxMBConv classes and the overview.
As for an alternative I'd say that it depends on what you want to store. I think using SQLite is a good alternative for smaller tables that don't grow too much in size. You could use the ODBC classes and use other DBMS, but since ODBC is rather slow there would surely be a performance drawback. XML is a nice thing, but not easy to start with (at least for me :)). There are a hell lot of parsers out there. For a simple DOM parser you could use wxXMLdoc that is part of the XRC resource system located in the contrib dir. Allthough they say that one shouldn't use it directly and there are discussions on the mailing list about a seperate wxXML, it works. I guess it uses expat under the hood... I guess the best thing for big databases would be to use the native API of that DMBS. Even if this means learning the new API, a direct connection to the DBMS is allways faster than using ODBC, especially on data retrieval. Just a thought: If the data you want to store is only character based and not that big in size, maybe a simple file like a conf or ini file would be enough...
upcaseupCASE ----------------------------------- If it was hard to write, it should be hard to read!- Do. Or do not. There is no try! | 3. Re: Lightweight database #3167 Posted by: 2004-01-02 07:37:58 | Thanks for your answer.
Right after I entered this message I went looking for a way to convert UNICODE to UTF8 in wxWindows, and I came upon the wxMBConv-classes.
There I do have one question about: I can pass now UTF8-strings to SQLite... So I can save in "UNICODE" format... But my strings in my program... For example if it is translated into Chinese or such... Do they show up just right? (I work with wxLocale in the following way: )
ok = CurrentLocale.Init( lID, wxLOCALE_CONV_ENCODING ); lID = wxLANGUAGE_DEFAULT ... wxLANGUAGE_ENGLISH ... and such | Forum List • Thread List • Refresh • New Topic • Search • Previous • Next 1 |
|
|