You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cayenne.apache.org by Toni Lamar <to...@yahoo.com> on 2007/10/09 10:47:16 UTC

Support for SQLite?

Do you have any plans to support SQLite: http://sqlite.org/ in Cayenne?
A lot of applications use it because it's so lightweight - much more
applications than the "already supported by Cayenne" openbase, ingres, etc..

Thanks,
Tony.
-- 
View this message in context: http://www.nabble.com/Support-for-SQLite--tf4592778.html#a13111379
Sent from the Cayenne - Dev mailing list archive at Nabble.com.


Re: Support for SQLite?

Posted by Aristedes Maniatis <ar...@maniatis.org>.
On 09/10/2007, at 7:56 PM, Toni Lamar wrote:

> Yes, for personal use :). I see allot of marketing around Derby  
> (and I'm
> aware that's in the JDK now), but
> I have yet to see a single use in a commercial project (I mean  
> projects that
> I can work on :) ).

Derby is really quite nice. I've been using it for a couple of years  
now with no issues. Very stable and the speed is very good.

Lots of people use it, either as Cloudscape (the IBM offering of the  
same product) or Derby (http://wiki.apache.org/db-derby/UsesOfDerby).  
It is certainly a bit more sophisticated and featured than SQLite,  
and particularly good for embedding in your application if you are  
writing in Java. I guess it depends on what you are wanting to use it  
for.

Andrus, if HSQLDB is a pain, then Derby might be an option. Easy to  
embed, although the jar is 2.2Mb which is a bit large. At some point  
when Java 6 becomes the minimum requirement for Cayenne Modeler that  
could go away.

Toni, if you want to have a go at throwing together an SQLite driver,  
there are some instructions to get you started here:

http://cayenne.apache.org/doc/custom-dbadapter.html


Ari

-------------------------->
Aristedes Maniatis
phone +61 2 9660 9700
PGP fingerprint 08 57 20 4B 80 69 59 E2  A9 BF 2D 48 C2 20 0C C8



Re: Support for SQLite?

Posted by Toni Lamar <to...@yahoo.com>.

Tore Halset wrote:
> 
> Do you need to use SQLite?
> 
Yes I do. In most projects (where decisions are not taken by developers),
changing the database is mostly not allowed :(.

I was asking about SQLite because for several projects I worked on, there's
a plan starting next month to use an ORM(what a progress :) ), and even if
I'm no more involved with those projects, I would like to propose them to
use Cayenne (because it has a Modeler and it's much faster to get
productive).


Tore Halset wrote:
> 
> Have you looked at Derby?
> 
Yes, for personal use :). I see allot of marketing around Derby (and I'm
aware that's in the JDK now), but
I have yet to see a single use in a commercial project (I mean projects that
I can work on :) ).

Thanks,
Tony
-- 
View this message in context: http://www.nabble.com/Support-for-SQLite--tf4592778.html#a13112493
Sent from the Cayenne - Dev mailing list archive at Nabble.com.


Re: Support for SQLite?

Posted by Tore Halset <ha...@pvv.ntnu.no>.
As far as I know, SQLite is an embedded ANSI-C db. Like hsql or derby  
in the java world.

Currently, SQLite is not supported, but it should be possible with a  
simple DbAdapter and a JNI wrapper to start the database.

Do you need to use SQLite? Have you looked at Derby?

  - Tore.

On Oct 9, 2007, at 10:47 , Toni Lamar wrote:

>
> Do you have any plans to support SQLite: http://sqlite.org/ in  
> Cayenne?
> A lot of applications use it because it's so lightweight - much more
> applications than the "already supported by Cayenne" openbase,  
> ingres, etc..
>
> Thanks,
> Tony.
> -- 
> View this message in context: http://www.nabble.com/Support-for- 
> SQLite--tf4592778.html#a13111379
> Sent from the Cayenne - Dev mailing list archive at Nabble.com.
>
>


Re: Support for SQLite?

Posted by Andrus Adamchik <an...@objectstyle.org>.
On Oct 9, 2007, at 12:39 PM, Toni Lamar wrote:

>>
>> At this point let me open a Jira for SQLLite task
>>
> Is Cayenne 2.0 the target too?

No. 2.0 branch is frozen and only accepts bug fixes.

Andrus


Re: Support for SQLite?

Posted by Toni Lamar <to...@yahoo.com>.
Wow, you are really fast :).
(There's no other list where I got so fast answers - and not just one :) ).


Andrus Adamchik wrote:
> 
> Back in 2004 when Steve Jobs announced that SQLLite would become a  
> default database under OS X, I first checked what our options are for  
> Cayenne support, only to discover that we couldn't do it as there was  
> no JDBC interface to SQLLite.
> 
> I googled it again today and it looks like there is finally a driver  
> available:
> 
>     http://www.zentus.com/sqlitejdbc/
> 
There seems to be more than just one solution. On this WIKI page:
http://www.sqlite.org/cvstrac/wiki?p=SqliteWrappers
at the Java section, there's more than one wrapper, and I'm not sure what
would
be the best.


Andrus Adamchik wrote:
> 
> So there's no reason for us not to support it.
> 
I'm glad to hear that.


Andrus Adamchik wrote:
> 
> Another question is how to go from announcing the intention to  
> actually writing a Cayenne adapter, considering the usual "everyone  
> is already busy with many other tasks" situation... 
> 
I suppose that this is always and everywhere the case, but that's why
"priorities" were made for :).
So for good priorities I would pose the question:
"What new feature(in relation to the implementation effort) would open
Cayenne for the most new users?".


Andrus Adamchik wrote:
> 
> At this point let me open a Jira for SQLLite task
> 
Is Cayenne 2.0 the target too?

Thanks,
Tony
-- 
View this message in context: http://www.nabble.com/Support-for-SQLite--tf4592778.html#a13112312
Sent from the Cayenne - Dev mailing list archive at Nabble.com.


Re: Support for SQLite?

Posted by Andrus Adamchik <an...@objectstyle.org>.
On Oct 9, 2007, at 12:13 PM, Andrus Adamchik wrote:

> SQLLite

And of course it is SQLite, not SQLLite.


Re: Support for SQLite?

Posted by Toni Lamar <to...@yahoo.com>.

Andrus Adamchik wrote:
> 
> Done. With dates and Modeler support.
> 
Incredible :-O . This is the fastest feature addition I've ever seen in an
open source project.

Thank you.

Toni.
-- 
View this message in context: http://www.nabble.com/Support-for-SQLite--tf4592778.html#a13138917
Sent from the Cayenne - Dev mailing list archive at Nabble.com.


Re: Support for SQLite?

Posted by Andrus Adamchik <an...@objectstyle.org>.
Done. With dates and Modeler support.

Andrus


On Oct 10, 2007, at 1:44 AM, Andrus Adamchik wrote:

> On Oct 9, 2007, at 12:44 PM, Andrus Adamchik wrote:
>> Also there are some promising info on concurrency:
>>
>>   http://sqlite.org/faq.html#q5
>>
>> Maybe we can experiment switching the modeler preferences engine  
>> to sqlite and cleanup the HSQLDB mess....
>>
>> Andrus
>
> I get carried away very easily... Today I thought I'd simply check  
> whether the JDBC driver works with SQLite, and ended up  
> implementing a working adapter. With all the SQLite limitations and  
> driver limitations on top of it, it actually worked pretty well.  
> There are still a number of unit tests that fail [1], but from what  
> I can tell, most are related to the missing capabilities.
>
> There is one remaining issue though that is really nasty and we'd  
> have to address at some point: the dates are not handled by the  
> JDBC driver [2]. This really sucks as this may require Cayenne to  
> use sqlite functions in the generated SQL, and without working  
> dates, I'd say the thing becomes much less usable.
>
> Andrus
>
>
> [1] https://issues.apache.org/cayenne/browse/CAY-875
> [2] "Dates and Time" at http://www.zentus.com/sqlitejdbc/usage.html
>


Re: Support for SQLite?

Posted by Andrus Adamchik <an...@objectstyle.org>.
On Oct 9, 2007, at 12:44 PM, Andrus Adamchik wrote:
> Also there are some promising info on concurrency:
>
>   http://sqlite.org/faq.html#q5
>
> Maybe we can experiment switching the modeler preferences engine to  
> sqlite and cleanup the HSQLDB mess....
>
> Andrus

I get carried away very easily... Today I thought I'd simply check  
whether the JDBC driver works with SQLite, and ended up implementing  
a working adapter. With all the SQLite limitations and driver  
limitations on top of it, it actually worked pretty well. There are  
still a number of unit tests that fail [1], but from what I can tell,  
most are related to the missing capabilities.

There is one remaining issue though that is really nasty and we'd  
have to address at some point: the dates are not handled by the JDBC  
driver [2]. This really sucks as this may require Cayenne to use  
sqlite functions in the generated SQL, and without working dates, I'd  
say the thing becomes much less usable.

Andrus


[1] https://issues.apache.org/cayenne/browse/CAY-875
[2] "Dates and Time" at http://www.zentus.com/sqlitejdbc/usage.html

Re: Support for SQLite?

Posted by Andrus Adamchik <an...@objectstyle.org>.
Also there are some promising info on concurrency:

   http://sqlite.org/faq.html#q5

Maybe we can experiment switching the modeler preferences engine to  
sqlite and cleanup the HSQLDB mess....

Andrus



On Oct 9, 2007, at 12:30 PM, Tore Halset wrote:
> Cool :)
>
> "It comes in two flavours, a 100% Pure Java driver based on  
> NestedVM or a native JNI library" .... "NestedVM provides binary  
> translation for Java Bytecode".
>
>  - Tore.
>
> On Oct 9, 2007, at 11:13 , Andrus Adamchik wrote:
>
>> Back in 2004 when Steve Jobs announced that SQLLite would become a  
>> default database under OS X, I first checked what our options are  
>> for Cayenne support, only to discover that we couldn't do it as  
>> there was no JDBC interface to SQLLite.
>>
>> I googled it again today and it looks like there is finally a  
>> driver available:
>>
>>    http://www.zentus.com/sqlitejdbc/
>>
>> So there's no reason for us not to support it.
>>
>> Another question is how to go from announcing the intention to  
>> actually writing a Cayenne adapter, considering the usual  
>> "everyone is already busy with many other tasks" situation... At  
>> this point let me open a Jira for SQLLite task, and mention that  
>> we'd like to invite our users who are actually using SQLLite to  
>> help us write the adapter ;-)
>>
>>    http://cayenne.apache.org/doc/custom-dbadapter.html
>>
>> Andrus
>>
>>
>> On Oct 9, 2007, at 11:47 AM, Toni Lamar wrote:
>>
>>>
>>> Do you have any plans to support SQLite: http://sqlite.org/ in  
>>> Cayenne?
>>> A lot of applications use it because it's so lightweight - much more
>>> applications than the "already supported by Cayenne" openbase,  
>>> ingres, etc..
>>>
>>> Thanks,
>>> Tony.
>>> -- 
>>> View this message in context: http://www.nabble.com/Support-for- 
>>> SQLite--tf4592778.html#a13111379
>>> Sent from the Cayenne - Dev mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>
>


Re: Support for SQLite?

Posted by Tore Halset <ha...@pvv.ntnu.no>.
Cool :)

"It comes in two flavours, a 100% Pure Java driver based on NestedVM  
or a native JNI library" .... "NestedVM provides binary translation  
for Java Bytecode".

  - Tore.

On Oct 9, 2007, at 11:13 , Andrus Adamchik wrote:

> Back in 2004 when Steve Jobs announced that SQLLite would become a  
> default database under OS X, I first checked what our options are  
> for Cayenne support, only to discover that we couldn't do it as  
> there was no JDBC interface to SQLLite.
>
> I googled it again today and it looks like there is finally a  
> driver available:
>
>    http://www.zentus.com/sqlitejdbc/
>
> So there's no reason for us not to support it.
>
> Another question is how to go from announcing the intention to  
> actually writing a Cayenne adapter, considering the usual "everyone  
> is already busy with many other tasks" situation... At this point  
> let me open a Jira for SQLLite task, and mention that we'd like to  
> invite our users who are actually using SQLLite to help us write  
> the adapter ;-)
>
>    http://cayenne.apache.org/doc/custom-dbadapter.html
>
> Andrus
>
>
> On Oct 9, 2007, at 11:47 AM, Toni Lamar wrote:
>
>>
>> Do you have any plans to support SQLite: http://sqlite.org/ in  
>> Cayenne?
>> A lot of applications use it because it's so lightweight - much more
>> applications than the "already supported by Cayenne" openbase,  
>> ingres, etc..
>>
>> Thanks,
>> Tony.
>> -- 
>> View this message in context: http://www.nabble.com/Support-for- 
>> SQLite--tf4592778.html#a13111379
>> Sent from the Cayenne - Dev mailing list archive at Nabble.com.
>>
>>
>
>


Re: Support for SQLite?

Posted by Andrus Adamchik <an...@objectstyle.org>.
Back in 2004 when Steve Jobs announced that SQLLite would become a  
default database under OS X, I first checked what our options are for  
Cayenne support, only to discover that we couldn't do it as there was  
no JDBC interface to SQLLite.

I googled it again today and it looks like there is finally a driver  
available:

    http://www.zentus.com/sqlitejdbc/

So there's no reason for us not to support it.

Another question is how to go from announcing the intention to  
actually writing a Cayenne adapter, considering the usual "everyone  
is already busy with many other tasks" situation... At this point let  
me open a Jira for SQLLite task, and mention that we'd like to invite  
our users who are actually using SQLLite to help us write the  
adapter ;-)

    http://cayenne.apache.org/doc/custom-dbadapter.html

Andrus


On Oct 9, 2007, at 11:47 AM, Toni Lamar wrote:

>
> Do you have any plans to support SQLite: http://sqlite.org/ in  
> Cayenne?
> A lot of applications use it because it's so lightweight - much more
> applications than the "already supported by Cayenne" openbase,  
> ingres, etc..
>
> Thanks,
> Tony.
> -- 
> View this message in context: http://www.nabble.com/Support-for- 
> SQLite--tf4592778.html#a13111379
> Sent from the Cayenne - Dev mailing list archive at Nabble.com.
>
>