From: <ton...@wh...> - 2014-11-03 18:24:39
|
Howdy, I've got wxWidgets 3.0.x working with wxSQLite3. I'm still somewhat new to wxWidgets, but I'm digging it. My understanding is that wxSQLite3 is a wrapper to SQLite3 functionality. It translates between wxString and the expected UTF-8 formats. That's good stuff. Now I am trying to decide how to handle OR/M. LiteSQL looked promising, but it tightly integrates to SQLite3, which means I get none of the benefits of wxSQLite3. ORD looked even less appealing. At this point, I am of the opinion that I need to roll my own OR/M patterns based upon wxSQLite3 API calls. My project doesn't really warrant writing a whole framework, so I wouldn't create a general solution for CRUD. So question time: 1. Is there an OR/M framework that works with wxWidgets and SQLite3 that I just haven't found? 2. If not 1), then does approach of rolling my own make the most sense? 3. How do you handle such things? Regards, \Tone |
From: Bryan P. <br...@ib...> - 2014-11-03 21:12:44
|
On Mon, Nov 3, 2014 at 11:08 AM, <ton...@wh...> wrote: > 1. Is there an OR/M framework that works with wxWidgets and SQLite3 > that I just haven't found? Not that I'm aware of. > 2. If not 1), then does approach of rolling my own make the most sense? Most likely not, but I think only you are going to be able to answer this one. > 3. How do you handle such things? The obvious benefit of wxSQLite is the automatic conversion of strings to wxStrings, but generally speaking, the recommended approach for wxWidgets applications is to only use wxString and other UI-specific data containers when interacting with UI components and controls, and to do the conversion only then. Otherwise it should be in whatever native format you're using for internal operations, and serialization. There's a pretty good chance that projects like LiteSQL and others provide features and functionality you'd never be able to provide in your own rolled version, or match their performance using wxWidgets data containers that are decently fast, but still optimized for use with user interface components. If you're expecting to build out a resource heavy DB implementation, I'd really give those more mature and native ORMs a chance, and find some simple solutions for converting and displaying that data on demand. Then again, you're using SQLite, which is already a step down from more powerful DB engines. SQLite is good for extremely simple relational DBs, but if you think you need a full ORM to wrap a much less simple DB, there's a decent chance you shouldn't be using SQLite at all. -- Regards, Bryan Petty |
From: Tone G. <ton...@wh...> - 2014-11-04 01:06:49
|
> Then again, you're using SQLite, which is already a step down from > more powerful DB engines. SQLite is good for extremely simple > relational DBs, but if you think you need a full ORM to wrap a much > less simple DB, there's a decent chance you shouldn't be using SQLite > at all. Could you recommend a better server-less, cross-platform database engine, please? |
From: Ulrich T. <ulr...@gm...> - 2014-11-04 12:31:05
|
Am 04.11.2014 02:06, schrieb Tone Garot: >> Then again, you're using SQLite, which is already a step down from >> more powerful DB engines. SQLite is good for extremely simple >> relational DBs, but if you think you need a full ORM to wrap a much >> less simple DB, there's a decent chance you shouldn't be using SQLite >> at all. > > Could you recommend a better server-less, cross-platform database > engine, please? IMHO, SQLite3 is definitely a good choice for a server-less database. Its SQL engine is fully fledged and implements most features of the SQL92 standard. Personally, I use it for an application which requires referential integrity and triggers with databases of up to 0.5 GB of data. For missing SQL92 features, see http://www.sqlite.org/omitted.html For pointers when to use or not use SQLite, see http://sqlite.org/whentouse.html Regards, Ulrich |
From: Tone G. <ton...@wh...> - 2014-11-04 13:00:45
|
Thank you. On 11/04/2014 06:30 AM, Ulrich Telle wrote: > Am 04.11.2014 02:06, schrieb Tone Garot: >>> Then again, you're using SQLite, which is already a step down from >>> more powerful DB engines. SQLite is good for extremely simple >>> relational DBs, but if you think you need a full ORM to wrap a much >>> less simple DB, there's a decent chance you shouldn't be using SQLite >>> at all. >> Could you recommend a better server-less, cross-platform database >> engine, please? > IMHO, SQLite3 is definitely a good choice for a server-less database. > Its SQL engine is fully fledged and implements most features of the > SQL92 standard. Personally, I use it for an application which requires > referential integrity and triggers with databases of up to 0.5 GB of data. > > For missing SQL92 features, see > http://www.sqlite.org/omitted.html > > For pointers when to use or not use SQLite, see > http://sqlite.org/whentouse.html > > Regards, > > Ulrich > > > > ------------------------------------------------------------------------------ > _______________________________________________ > wxCode-users mailing list > wxC...@li... > https://lists.sourceforge.net/lists/listinfo/wxcode-users -- *Tone Garot* Architect, Lead Programmer Whimbrel, LLC /Digital Asset Management Tools/ |