Re: [sqlite] question on creating/populating table with varchar/clob data types

2009-02-24 Thread Jay A. Kreibich


> Richard,
> 
> This is fascinating.

  To quote a bit from "The Definitive Guide to SQLite" by Michael Owens:

  SQLite was conceived on a battleship... well, sort of.
  SQLite's author, D. Richard Hipp, was working for General
  Dynamics on a program for the U.S. Navy developing software
  for use on board guided missile destroyers. The program
  originally ran on Hewlett-Packard Unix (HPUX) and used an
  Informix database as the back-end.

   -j

-- 
Jay A. Kreibich < J A Y  @  K R E I B I.C H >

"Our opponent is an alien starship packed with atomic bombs.  We have
 a protractor."   "I'll go home and see if I can scrounge up a ruler
 and a piece of string."  --from Anathem by Neal Stephenson
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] question on creating/populating table with varchar/clob data types

2009-02-23 Thread python
Dr. Hipp,

> The story goes like this: ...

Great story!

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


Re: [sqlite] question on creating/populating table with varchar/clob data types

2009-02-23 Thread P Kishor
On Mon, Feb 23, 2009 at 8:01 PM, D. Richard Hipp  wrote:
>
> On Feb 23, 2009, at 3:54 PM, P Kishor wrote:
>
>> On Mon, Feb 23, 2009 at 2:46 PM, D. Richard Hipp 
>> wrote:
>>>
>> ..
>>>
>>> SQLite is, in fact, a TCL extension that escaped into the wild.  It
>>> is
>>> specifically designed to integrate well with Tcl/Tk.
>>>
>> ..
>>
>> Did you ever tell that story anywhere? Would be fun to read it.
>
> The story goes like this:  I was working on a big Tcl/Tk+C app.  (The
> problem to be solved was interesting in its own right.  It turned out
> to be NP complete - equivalent to subgraph homomorphism.  But the
> customer wasn't interested in "why not" - they just wanted a
> solution.  We found some good heuristics, but that is another
> story...)  The application was highly graphical (made extensive use of
> the Tcl/Tk canvas widget) and had to run on legacy hardware.  HPUX.  C
> code to do the heavy computation.  Tcl/Tk for control and display.
> Data from an Informix database.  Worked really well.
>
> But  Every so often the operators would power-cycle the HPUX
> machine.  And when this happened, the Informix database server would
> not reboot successfully all the time.  When it did not, and the
> operators double-clicked on my application, it (obviously) failed with
> a message:  "Cannot connect to database server".  This was not my
> fault.  But because my application painted the error dialog, I'm the
> one who had to take the support call.  Not a good situation.
>
> So I thought what if there was a database engine that would read
> and write directly to the disk without going through a server.  Then
> if the machine was healthy enough to bring up X11, I'd never have
> problems accessing the database.  SQLite 1.0 was born shortly
> thereafter.
>
>


Richard,

This is fascinating. This may not be the best place for expanding on
this (on the other hand, this may be as good a place as any), but a
few questions arise --

1. Unless you don't want to, (or *that* client doesn't want to), it
would be interesting to know who was that you were working for.

2. What was the big Tcl/Tk and C app?

3. When was this happening?

4. Weren't there any existing solutions that you considered?

5. When did sqlite actually acquire traction in the open source community?

Shucks, this should go on the sqlite.org/history page.

Thanks for the above insight though. Even this much is great to know.


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


Re: [sqlite] question on creating/populating table with varchar/clob data types

2009-02-23 Thread D. Richard Hipp

On Feb 23, 2009, at 3:54 PM, P Kishor wrote:

> On Mon, Feb 23, 2009 at 2:46 PM, D. Richard Hipp   
> wrote:
>>
> ..
>>
>> SQLite is, in fact, a TCL extension that escaped into the wild.  It  
>> is
>> specifically designed to integrate well with Tcl/Tk.
>>
> ..
>
> Did you ever tell that story anywhere? Would be fun to read it.

The story goes like this:  I was working on a big Tcl/Tk+C app.  (The  
problem to be solved was interesting in its own right.  It turned out  
to be NP complete - equivalent to subgraph homomorphism.  But the  
customer wasn't interested in "why not" - they just wanted a  
solution.  We found some good heuristics, but that is another  
story...)  The application was highly graphical (made extensive use of  
the Tcl/Tk canvas widget) and had to run on legacy hardware.  HPUX.  C  
code to do the heavy computation.  Tcl/Tk for control and display.   
Data from an Informix database.  Worked really well.

But  Every so often the operators would power-cycle the HPUX  
machine.  And when this happened, the Informix database server would  
not reboot successfully all the time.  When it did not, and the  
operators double-clicked on my application, it (obviously) failed with  
a message:  "Cannot connect to database server".  This was not my  
fault.  But because my application painted the error dialog, I'm the  
one who had to take the support call.  Not a good situation.

So I thought what if there was a database engine that would read  
and write directly to the disk without going through a server.  Then  
if the machine was healthy enough to bring up X11, I'd never have  
problems accessing the database.  SQLite 1.0 was born shortly  
thereafter.


>
>
> -- 
> Puneet Kishor http://www.punkish.org/
> Nelson Institute for Environmental Studies http://www.nelson.wisc.edu/
> Open Source Geospatial Foundation (OSGeo) http://www.osgeo.org/
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

D. Richard Hipp
d...@hwaci.com



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


Re: [sqlite] question on creating/populating table with varchar/clob data types

2009-02-23 Thread P Kishor
On Mon, Feb 23, 2009 at 2:46 PM, D. Richard Hipp  wrote:
>
..
>
> SQLite is, in fact, a TCL extension that escaped into the wild.  It is
> specifically designed to integrate well with Tcl/Tk.
>
..

Did you ever tell that story anywhere? Would be fun to read it.

-- 
Puneet Kishor http://www.punkish.org/
Nelson Institute for Environmental Studies http://www.nelson.wisc.edu/
Open Source Geospatial Foundation (OSGeo) http://www.osgeo.org/
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] question on creating/populating table with varchar/clob data types

2009-02-23 Thread D. Richard Hipp

On Feb 23, 2009, at 3:29 PM, anjela patnaik wrote:

> Hello all,
>
> I have a TCL application that writes database records to an Oracle  
> db. This database has grown to contain 8000 records. There are 2  
> columns of varchar with 4k chars and 1 column of clob which contains  
> 1Mg max. The data in this database are scripts.
>
> Now, I need to write another application in TK that works offline,  
> but retrieves the data in this database and presents it to the user.  
> I am not going to be able to access this Oracle db so I was  
> wondering if I could export all the data to a SQLite db and then  
> access it from TCL/TK.
>
> Does SQLite handle 4k Varchar fields and clobs? Is there a limit on  
> # of rows? Can I create a db on the fly as part of a TCL/TK  
> application ?

SQLite is, in fact, a TCL extension that escaped into the wild.  It is  
specifically designed to integrate well with Tcl/Tk.

SQLite accepts VARCHAR and BLOB and CLOB fields up to 1GiB in size.   
The database can be up to 64 Tebibytes in size.  There is no limit on  
the number of rows (you will hit the file size limit first.)

SQLite is way faster than Oracle in a single-user applications.


>
>
> My other alternative was to offload the Oracle data to a XML/Xcel  
> file and then write TCL code to parse it.
>

That would be a silly thing to do.


D. Richard Hipp
d...@hwaci.com



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


[sqlite] question on creating/populating table with varchar/clob data types

2009-02-23 Thread anjela patnaik
Hello all,
 
I have a TCL application that writes database records to an Oracle db. This 
database has grown to contain 8000 records. There are 2 columns of varchar with 
4k chars and 1 column of clob which contains 1Mg max. The data in this database 
are scripts.
 
Now, I need to write another application in TK that works offline, but 
retrieves the data in this database and presents it to the user. I am not going 
to be able to access this Oracle db so I was wondering if I could export all 
the data to a SQLite db and then access it from TCL/TK. 
 
Does SQLite handle 4k Varchar fields and clobs? Is there a limit on # of rows? 
Can I create a db on the fly as part of a TCL/TK application ?
 
My other alternative was to offload the Oracle data to a XML/Xcel file and then 
write TCL code to parse it.
 
Thank you


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