RE: [sqlite] Any advantages of "varchar()" over "text"?

2007-12-07 Thread Samuel R. Neff
 
-Original Message-
From: P Kishor [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 07, 2007 5:50 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] Any advantages of "varchar()" over "text"?

I may be wrong, but my understanding is that other than INTEGER
PRIMARY KEY, SQLite doesn't give a rat's batuti about what you define
a column as... for example,



... it does matter what datatype you use, just SQLite is very forgiving.
But read the section on "column affinity" in the datatypes page for the
importance of selecting the right types and aliases for the pre-defined
types.

http://sqlite.org/datatype3.html

HTH,

Sam


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Any advantages of "varchar()" over "text"?

2007-12-07 Thread Zbigniew Baniewski
On Fri, Dec 07, 2007 at 04:50:19PM -0600, P Kishor wrote:

> I may be wrong, but my understanding is that other than INTEGER
> PRIMARY KEY, SQLite doesn't give a rat's batuti about what you define

Perhaps it's related to "closed relations" between SQLite and Tcl. Well,
it's even more comfortable then. Less things to take care of.
-- 
pozdrawiam / regards

Zbigniew Baniewski

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Any advantages of "varchar()" over "text"?

2007-12-07 Thread P Kishor
On 12/7/07, Zbigniew Baniewski <[EMAIL PROTECTED]> wrote:
> We can define in, using SQLite, both "fixed max. width" VARCHAR() fields (I
> know, in practice it can be crossed over), as well as "no limit" TEXT fields.
>
> So I would to ask: are there any benefits from using VARCHAR() and not TEXT?
> For example faster(?) data access - or just anything, that makes establishing
> such limit on the field length reasonable?

I may be wrong, but my understanding is that other than INTEGER
PRIMARY KEY, SQLite doesn't give a rat's batuti about what you define
a column as... for example,

CREATE TABLE foo (a ELEPHANT, b ZEBRA(32))

should be a perfectly valid statement.

It does provide INTEGER, REAL, DATE, TEXT, and BLOB as five types, but
it is a free for all in their.

You might want to define columns more specifically with a view to
making your schema more portable.

-
To unsubscribe, send email to [EMAIL PROTECTED]
-