-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 04/17/2011 04:43 PM, Stefan Keller wrote: > I clearly prefer 'weakly typed' (or even type-less) over "dynamically > typed" (mentioned in http://www.sqlite.org/datatype3.html ).
The irony is that SQLite is more strongly typed in my opinion. If you stick a particular value in particular column and row then that is what you get back out. Getting out what you put in is strong! Now you can give suggestions to SQLite to attempt to convert values in a particular column to another type which it will try to do if such a conversion is safe (eg "3" can be safely converted to an integer while "xxx" cannot.) > ACID principles. SQLite is ACID - show where that is not the case if you believe otherwise. ACID has nothing to do with typing. > As a data reader you have to expect any type in every column value. Err, only if you put any type in there in the first place! If you only ever put integers in a column then that is all you will ever get out (assuming you didn't ask SQLite to try and convert). Same with the other types. If you have a requirement that only a certain type can be in a column then use a CHECK constraint and it will be enforced. sqlite> create table x(y CHECK(typeof(y)=='real')); sqlite> insert into x values(3); ConstraintError: constraint failed sqlite> insert into x values(3.3); sqlite> > This is why to me .... Your complaints are really that SQLite doesn't function exactly how you are used to. Note that it does do exactly what you tell it - the behaviour is not random. In other news people complained about those new fangled cars not behaving exactly like the horses they were used to. Eventually they got over it and realised it was a wonderful improvement most of the time. Roger -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2ri3oACgkQmOOfHg372QT1WQCeNJAEs1/MooG1Zi2qFuKsRFj5 Uo0AmwYl+avz2/+aMIM/euw51XWhNSYK =fB3t -----END PGP SIGNATURE----- _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users