Re: [sqlite] How does SQLite store data?

2007-03-26 Thread drh
<[EMAIL PROTECTED]> wrote: > > I am not aware of a BOOLEAN type. > The types defined in the website are: NULL, INTEGER, REAL, TEXT and BLOB. > Is BOOLEAN a hidden type? > BOOLEAN is not a different type. What Dennis meant was that integer values 0 and 1 are stored more efficiently in the new

Re: [sqlite] How does SQLite store data?

2007-03-26 Thread rhurst2
Dennis Cote <[EMAIL PROTECTED]> wrote: > John Stanton wrote: > > It does not have fixed length columns except for the ones which hold > > integer and real numbers and boolean values. > > > Actually, integers are stored in a variable length format as well. It > takes less space to store

Re: [sqlite] How does SQLite store data?

2007-03-26 Thread Dennis Cote
P Kishor wrote: interesting. As far as _I_ know, the first implementation of varint! No, this idea has been around for a long time. It was used for ISDN addressing for example. I'm sure it is probably in Knuth somewhere. It is still a very good idea though. is it reasonable to assume

Re: [sqlite] How does SQLite store data?

2007-03-26 Thread P Kishor
On 3/26/07, Dennis Cote <[EMAIL PROTECTED]> wrote: John Stanton wrote: > It does not have fixed length columns except for the ones which hold > integer and real numbers and boolean values. > Actually, integers are stored in a variable length format as well. It takes less space to store smaller

Re: [sqlite] How does SQLite store data?

2007-03-26 Thread Dennis Cote
John Stanton wrote: It does not have fixed length columns except for the ones which hold integer and real numbers and boolean values. Actually, integers are stored in a variable length format as well. It takes less space to store smaller integer values than it does to store large values.

Re: [sqlite] How does SQLite store data?

2007-03-24 Thread John Stanton
There are no stupid questions. only stupid answers. Sqlite stores the entire length of the string and never truncates. Its TEXT type handles every string, provided that it is text, otherwise it needs to be a BLOB (e.g. a JPEG). Sqlite is simpler than you can imagine to use because its

Re: [sqlite] How does SQLite store data?

2007-03-24 Thread Jonathon Blake
John wrote: A TEXT string is stored at its actual length. You may declare a text column as 80 characters wide but you could store a string 32K long in that column. The 80 is stored by Sqlite but ignored. Stupid question. Does that mean that SQLite: * truncates the field at 80 characters? *

Re: [sqlite] How does SQLite store data?

2007-03-24 Thread John Stanton
Sqlite has a concept called "manifest typing" where it makes decisons on how to store data. It does not have fixed length columns except for the ones which hold integer and real numbers and boolean values. A TEXT string is stored at its actual length. You may declare a text column as 80

[sqlite] How does SQLite store data?

2007-03-23 Thread rhurst2
I created several tables that specified explicitly the size of each column. I put some bogus numbers and text into it but I didn't put numbers in it that would completely fill the column data. I was surprised to find that the resulting database file was smaller than I had expected. This