Re: [flexcoders] Flex 3: AIR Local Database
The answer to your question about large scale is yes, AIR + SQLite can handle large datasets but with some caveats. I have a SQLite database that is several hundred megabytes. The main tables contain 4 million rows, 275000 rows, and 3500 rows. Queries that join these tables, when the query makes use of indexes, execute in under 100 milliseconds. Snappy. However, some things in the AIR implementation of SQLite are causing index optimizations with the LIKE() operator not to work, both in regular statements and in prepared statements. I am not sure what these things are because the differences between the AIR implementation of SQLite and SQLite proper haven't been documented. They could be things like overloading certain core SQLite functions, or compiling statements/prepared statements with one of the functions that cause the optimizer not to use an index. As a result of these mysterious things, if you run a query like SELECT * from MEMBERSHIP where MEMBER_LASTNAME LIKE 'Johns%' the query will do a full table scan. Do a more complex column value starts-with query that involves joins, and the table scan can translate to very poor performance. For example, when I execute my query at the SQLITE3.EXE command-line, where the index IS used, the query executes in under 100ms but the identical query takes 45-50 seconds in AIR. Also, to keep the front-end responsive when working with large datasets, you will have to use asynchronous data connections not synchronous connections. The coding is somewhat more complicated but also I found the AIR debugger to be less than robust when working with asynchronous connections and data events. However, everything worked OK with Responders, so I'd recommend the use of responder objects over the event-dispatch architecture. I have no experience to offer you with concurrency issues and SQLite. My AIR + local-db application is single-user. Regards TR jwc_wensan wrote: In all the articles I have read and some examples, it only talks about using SQLite as the database on the users' PC/Mac. Is that the only database that can be used locally? Can that database handle a large-scale commercial AIR app with tens of thousands of records? Also, since the AIR app is installed on the users PC/Mac, is there any reason to use mx:Modules? If the user needs/requires that data remain local, is AIR the best solution? Does Flex 4 solve any issues? Thoughts, options, suggestions? Thanks in advance, Jack
[flexcoders] Flex 3: AIR Local Database
In all the articles I have read and some examples, it only talks about using SQLite as the database on the users' PC/Mac. Is that the only database that can be used locally? Can that database handle a large-scale commercial AIR app with tens of thousands of records? Also, since the AIR app is installed on the users PC/Mac, is there any reason to use mx:Modules? If the user needs/requires that data remain local, is AIR the best solution? Does Flex 4 solve any issues? Thoughts, options, suggestions? Thanks in advance, Jack
Re: [flexcoders] Flex 3: AIR Local Database
I've had many thousand records before and SQLite performed just fine. The only limitation I found was with datatypes which is easily overcome in most cases. I can't comment about the rest. On Thu, Oct 22, 2009 at 5:28 PM, jwc_wensan jwcaldw...@zingit.com wrote: In all the articles I have read and some examples, it only talks about using SQLite as the database on the users' PC/Mac. Is that the only database that can be used locally? Can that database handle a large-scale commercial AIR app with tens of thousands of records? Also, since the AIR app is installed on the users PC/Mac, is there any reason to use mx:Modules? If the user needs/requires that data remain local, is AIR the best solution? Does Flex 4 solve any issues? Thoughts, options, suggestions? Thanks in advance, Jack
Re: [flexcoders] Flex 3: AIR Local Database
2009/10/23 jwc_wensan jwcaldw...@zingit.com: In all the articles I have read and some examples, it only talks about using SQLite as the database on the users' PC/Mac. Is that the only database that can be used locally? Because AIR has support for sockets, there are ongoing projects to give AIR the ability to talk to other databases. Here's one for mysql (http://code.google.com/p/assql/). You don't get the one-click install though. Also, given AIR 2.0 has support for native executables, you could if push comes to shove, use a native executable to be the conduit between AIR and whatever database you want.
RE: [flexcoders] Flex 3: AIR Local Database
Guys: Thanks for your comments. I am beginning to wonder if AIR is the best solution. The application must be cross browser/cross platform compatible and the user requires the data remain local on their PC/Mac. I don't really want to get into hacks, workarounds, etc. I just want something that is clean and works. Not sure of my options. More research I guess. Anyone else with ideas, please comment. Thanks, Jack From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Sam Lai Sent: Thursday, October 22, 2009 10:48 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Flex 3: AIR Local Database 2009/10/23 jwc_wensan jwcaldw...@zingit.com mailto:jwcaldwell%40zingit.com : In all the articles I have read and some examples, it only talks about using SQLite as the database on the users' PC/Mac. Is that the only database that can be used locally? Because AIR has support for sockets, there are ongoing projects to give AIR the ability to talk to other databases. Here's one for mysql (http://code.google.com/p/assql/). You don't get the one-click install though. Also, given AIR 2.0 has support for native executables, you could if push comes to shove, use a native executable to be the conduit between AIR and whatever database you want. image001.gifimage002.gif