On 30 Dec 2011, at 4:40pm, Jay A. Kreibich wrote:

> On Fri, Dec 30, 2011 at 04:10:55PM +0530, Durga D scratched on the wall:
>> Hi all,
>> 
>>    I have sqlite table with 71 columns. not null for 70 and one is
>> surrogate key(primary key). Sqlite3 3.7.9 doesn't support not null for 70
>> columns and unique(70 columns). It's worked fine upto 30 columns not null
>> and unique(70 columns).
>> 
>>  I need 70 columns with unique and not null. How to enable it?
> 
>  Do you mean 70 columns that each have a single-column unique
>  constraint, or a single unique constraint that crosses 70 columns?

I think he means he has 70 columns, each of which have to be unique.  Which, of 
course, means he'll have 70 implicit indexes on that table.  It'll make 
inserting things slow, but I don't why any reason why SQLite shouldn't do it.  
On the other hand, I wouldn't want to make SQLite update 70 columns each time I 
INSERTed a row, and I'd probably rely on my application to do it instead of the 
DBMS.

Durga, here are the limits to the number of things you can have in SQLite:

<http://www.sqlite.org/limits.html>

No mention of a maximum number of indexes.  But frankly I'm suspicious of any 
table which has 70 columns.  You should be able to hold all the columns of a 
table in your head at once, and I lose my place long before 70 columns.

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

Reply via email to