Re: OT: Canadian Tax Database - Mailing list pgsql-general

From omar
Subject Re: OT: Canadian Tax Database
Date
Msg-id 45F228C5.6060305@omnicode.com
Whole thread Raw
In response to Re: OT: Canadian Tax Database  (ptjm@interlog.com (Patrick TJ McPhee))
Responses Re: OT: Canadian Tax Database  (Jorge Godoy <jgodoy@gmail.com>)
Re: OT: Canadian Tax Database  (Jeff Davis <pgsql@j-davis.com>)
List pgsql-general
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.
>


pgsql-general by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: Setting week starting day
Next
From: Bill Moseley
Date:
Subject: Re: Trigger for Audit Table