Re: [sqlite] Tcl/Perl/Python Integration with SQLite3

2013-09-04 Thread Simon Slavin

On 3 Sep 2013, at 2:31pm, ashutosh_maheshwa...@dell.com wrote:

> 1.   Documentation says, SQLite has in-build support for TCL with sqlite3 
> command. But TCL 8.6 itself is coming with TDBC options for SQLite and the 
> TCL distribution has got its own SQLite package in it.  My problem is how 
> both version of SQLite would co-exist? If I don't compile TDBC and SQLite 
> packages, a script written in TCL using sqlite3 command does not work, don't 
> know why?
> 
> 2.   Similarly Python 2.6.8 and above and Perl DBD and DBI distribution 
> from CPAN comes with their own version of SQLite integrated with the 
> respective languages. So should I go ahead and install them? Will that 
> interfere with the actual SQLite distribution? Can all the different (now 4) 
> SQLite version refer to the same database for querying, inserting records 
> etc.?

Because SQLite is just a set of file-handling routines, and has no 'server' or 
memory-resident code, there is no central 'distribution' or 'installation' for 
SQLite.  There's no central place that all programs or programming languages 
look for it, and if, for example, Perl offers to 'install' SQLite which it 
means is it will install a version for Perl to use, not for everything else to 
use.

Each program or programming language may have its own copy of the SQLite 
library and all of them may access the same database files without problems.  
The last change in file format for the SQLite database file came with version 
3.3.7 which was issued in 2006.  As long as all your languages and software are 
using version 3.3.7 or later, they can all access the same database files.  At 
the same time.

There is little problem with WAL mode, which is not supported by versions 
before 3.7.0 in 2010 but if you are using any version earlier than that just 
don't use WAL mode in any of your applications.  They'll be a little slower.

What I would suggest you do is download the shell tool from the SQLite site.  
This was written by the SQLite team and gives you a 100% bullet-proof guide as 
to what's in a database.  It's useful if any of your different languages or 
packages claims that the database is corrupt or does not contain the data you 
thought it did.



Simon.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Tcl/Perl/Python Integration with SQLite3

2013-09-04 Thread Ashutosh_Maheshwari1
Hi,

In my project, We are using all the 3 scripting language mentioned in the 
subject line. There is a requirement to support a database in my 
project/product and we should be able to write scripts to access/modify the 
database. We selected SQLite to suit our requirements.
Now the problem arises:


1.   Documentation says, SQLite has in-build support for TCL with sqlite3 
command. But TCL 8.6 itself is coming with TDBC options for SQLite and the TCL 
distribution has got its own SQLite package in it.  My problem is how both 
version of SQLite would co-exist? If I don't compile TDBC and SQLite packages, 
a script written in TCL using sqlite3 command does not work, don't know why?

2.   Similarly Python 2.6.8 and above and Perl DBD and DBI distribution 
from CPAN comes with their own version of SQLite integrated with the respective 
languages. So should I go ahead and install them? Will that interfere with the 
actual SQLite distribution? Can all the different (now 4) SQLite version refer 
to the same database for querying, inserting records etc.?

Please suggest me ways to have a SQLite database and support from all the 3 
scripting language to query the database.

Thanks,
Ashutosh

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users