Tom, I promise this isn't a political statement, even though it's on the
same thread.
I'm curious what people think about the following statement considering
the database typing talk being brought up here. My experience is that
more times than not I have to put data validation in my client code even
when it's available on the server, if for no other reason that users
don't understand what foreign key violation, etc messages mean. It begs
the question of whether it's really necessary on the server or not.
SQLite seems to take the position that it isn't since there is no
referential integrity and the following. To be honest, there's a lot of
power in the ability to view everything as a string, with of course
proper data validation.
http://www.sqlite.org/datatypes.html
>>>SQLite is "typeless". This means that you can store any kind of data
you want in any column of any table, regardless of the declared datatype
of that column. (See the one exception to this rule in section 2.0
below.) This behavior is a feature, not a bug. A database is suppose to
store and retrieve data and it should not matter to the database what
format that data is in. The strong typing system found in most other SQL
engines and codified in the SQL language spec is a misfeature - it is an
example of the implementation showing through into the interface. SQLite
seeks to overcome this misfeature by allowing you to store any kind of
data into any kind of column and by allowing flexibility in the
specification of datatypes.<<<
Patrick TJ McPhee wrote:
To be fair, this is not "the tax system". It's a staging database
used for electronic filing, and it's pretty common to use typeless
databases in the first stage of that sort of application.