r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[SQLite] C library embeddable DB .

BrianH
14-Dec-2007
[660]
You don't need /Command SQLite, just library access and you get that 
in /Pro. There are other advantages to /Command though.
GiuseppeC
14-Dec-2007
[661x2]
I know. I will buy the /pro version next year and the whole package 
when my application will be ready.
(Hoping in a free upgrade to R3)
Robert
17-Dec-2007
[663x2]
Petr, congrats to really find a bug. I think I have been hit by this 
one too.
I will make an update of the SQLite engine. I'm still using a rather 
old one.
Pekr
19-Dec-2007
[665]
New version released ... hehe, my ticket is part of the announcement 
:-) http://www.sqlite.org/news.html
Graham
19-Dec-2007
[666]
what's sqlite's domain?
Pekr
19-Dec-2007
[667x3]
what do you mean by "domain"?
I can confirm it fixes data corruption for my case. Nice fix!
do you mean domain of usage? or?
Graham
19-Dec-2007
[670]
domain of use
Pekr
19-Dec-2007
[671]
single user apps. Or fileshared ones. Embedded space. Advantage against 
mySQL embedded - SQL interface, free. Not easily used for server 
solutions, although could be solved by some server dispatching requests. 
No installation, just one single dll.
Graham
19-Dec-2007
[672x2]
message board??
probably not from what you say.
Ashley
19-Dec-2007
[674]
Why not? It's ACID compliant and SQLite on a server where all file 
ops are local to the DB process seems OK to me.
Ashley
20-Dec-2007
[675]
From "Suggested Uses For SQLite" ( http://www.sqlite.org/features.html
)

Website Database

 Because it requires no configuration and stores information in order 
 disk files, SQLite is a popular choice as the database to back small 
 to medium-sized websites

Stand-in For An Enterprise RDBMS

 SQLite is often used as a surrogate for an enterprise RDBMS for demonstration 
 purposes or for testing. SQLite is fast and requires no setup, which 
 takes a lot of the hassle out of testing and which makes demos perky 
 and easy to launch.
Pekr
20-Dec-2007
[676]
Is there any commonly suggested server mode? I mean tcp server, serialising 
requests, querying db and returning results back to users?
BrianH
20-Dec-2007
[677x3]
It is usually suggested that you build your own wrapper. REBOL/Services 
would be good for this.
BTW, your new release doesn't seem to be downloading :(
Graham, that features page also says how to use SQLite to manage 
the files that store your application data. It's a cool hack.
Graham
20-Dec-2007
[680x3]
Maybe Altme could use it to store local messages?
I'm storing user configuration data on the server (firebird) in a 
text blob field ... which is one serialized rebol object.  Each time 
I change a configuation parameter, the whole object is saved back 
to the database.
It does raise interesting possibilities though for other things.
GiuseppeC
27-Dec-2007
[683]
I have found an interesting PHP project I would like to see ported 
on Rebol: http://adodb.sourceforge.net/. It is a layer to access 
nearly all database available in this world with plugings.
Will
24-Mar-2008
[684]
how can I connect to multiple databases at the same time without 
disconnecting?
Pekr
25-Mar-2008
[685x2]
via the 'attach command?
with the driver, just use connect [db1 db2 db3] etc. IIRC, you can 
attach max 9 databases ...
Pavel
25-Mar-2008
[687]
Or recompile the DLL with MAXDATABASES optinon increased
Will
25-Mar-2008
[688]
What I need is connect to a database , than in a second time, connect 
to another database, multiple connections open, no sqlite attach, 
possible?
Robert
26-Mar-2008
[689]
Why not use ATTACH?
Will
29-Mar-2008
[690x2]
I wanted separate connections, but maybe I understand it wrong as 
it is not same as with mysql, so probably have to go with attach, 
thanks for the suggestions.
I'm on os x 10.5.2, sqlite.r works fine with system preinstalled 
sqlite which is version 3.4.0, but doesn't work with latest version 
3.5.7 (installed thru macports), is this known or os x specific?
BrianH
29-Mar-2008
[692]
I expect that is due to changes in SQLite - it has changed the API 
a bit between 3.4.0 and 3.5.x
Will
29-Mar-2008
[693x4]
macport/sqlite3 version 3.5.4 worked but was 2 times slower than 
with 3.4.0
Thanks BrianH, i'll stick with 3.4.0
btw, are you all considering moving to treatbase?
maybe someone could check if 3.5.7 works with other platforms, if 
not, the sqlite.r maintainer can maybe spot an easy fix looking at 
http://www.sqlite.org/changes.html
Robert
30-Mar-2008
[697x3]
I have 3.5.7 running on Windows together with Rebol. Works perfectly.
I got the DLL into 215KB :-)
Tretbase? I think it's pur Rebol based, right? No I won't. I don't 
think Rebol is the right tool for a database engine.
btiffin
30-Mar-2008
[700]
Robert;  I'll fight you on that.  :)  Depends on the scale.  RebDB 
is beautiful for dbs under the 10K ish limit;  TRETBASE is destined 
to be a very handy REBOL scripting database engine, and Paul has 
been hammering on some larger datasets, (not something I'd plan on, 
but it's being developed that way).  So unless you are working in 
the 100K+ record arena, or need multiple user concurrency, I do think 
REBOL is the right tool for a database engine.
Robert
31-Mar-2008
[701]
;-) Are RebDB and TRETBASE ACID conform?
btiffin
31-Mar-2008
[702]
I didn't expect to win the fight, but I wasn't really expecting to 
get pinned on the first move.  :)  But I'll struggle a little more. 
 In the long run I think the simplicity of the pure REBOL solutions 
(and a little careful manual (or scripted) management) will have 
fewer headaches than a larger full scale  ACID database (again in 
the small dataset arena).


My opinion may vary over time and over projects...but not today. 
  And sorry about clogging the SQLite chat.  rebols could well build 
up a fair amount of expertise with this engine given that  load/library 
is now open to all.
Robert
31-Mar-2008
[703x3]
Ok, and please don't get me wrong. SQLite is nice because it's small 
and simple to attach to Rebol, thanks to the work of Ashley. So even 
for 10K records you can use it because the costs are low.
But, it stays a SQL database not directly optimized for Rebol usage.
So, getting a database system that has much better / native Rebol 
support makes a lot of sense. Hopefully such a system will once be 
implemented on the C level for good performance etc.
Ashley
7-Apr-2008
[706]
Will, did you try modifying the following lines in the driver:

	*lib: load/library ... ; to call the correct version

 *prepare: make routine! ... ; to use "sqlite3_prepare_v2" instead 
 of "sqlite3_prepare"
Will
7-Apr-2008
[707x2]
Thank you Ashley, have changed to v2 but get:
connect/log/create d 
** User Error: SQLite out of memory
** Near: make error! reform ["SQLite" error]
Ashley
7-Apr-2008
[709]
Are you able to connect to an existing db file?