Path: dp-news.maxwell.syr.edu!spool.maxwell.syr.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsgate.cistron.nl!transit.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Date: Sun, 28 May 2006 13:04:52 +0200
From: mAsterdam <mAsterdam@vrijdag.org>
Organization: Pakhuis
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: comp.databases.theory
Subject: Re: Why all the max length constraints?
References: <1148773922.267863.170930@j55g2000cwa.googlegroups.com>   <1148775197.195932.299730@y43g2000cwc.googlegroups.com> <1148780864.560153.47550@g10g2000cwb.googlegroups.com>
In-Reply-To: <1148780864.560153.47550@g10g2000cwb.googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 44
Message-ID: <44798303$0$31642$e4fe514c@news.xs4all.nl>
NNTP-Posting-Host: 82.92.225.151
X-Trace: 1148814084 news.xs4all.nl 31642 [::ffff:82.92.225.151]:53895
X-Complaints-To: abuse@xs4all.nl
Xref: dp-news.maxwell.syr.edu comp.databases.theory:40118

dawn wrote:
> Marshall wrote:
>>dawn wrote:
>>>[why all the length constraints?]

[snip]
>>Realistically, if you have a field for state/province, and someone
>>enters 6 megabytes of character data, something has gone wrong
>>somewhere.
> 
> Yes, and there should be no data entry widget that permits entry of
> more than 2 characters for a state code, for example, more likely
> selecting from a drop-down.

If the state code fields (*) in the database are defined
as having 2 characters, there is a efective max-length
constraint of 2. Now it doesn't matter wether there is
a data entry widget that permits entry of more than 2
characters for a state code. The data in the the database
is garantueed to not violate this specific constraint.

Another constraint set/type (ISO country-codes) would
be tighter, of course, and the user interface could
well be more sophisticated by using them.

(*) Not phrased in RM terms to show that this
is a general database issue, not RM specific.

>>Better to trap it around character 255 than to
>>let it just run along sucking up resources.
> 
> 
> I do want the software product (as a whole) to limit
> anything which has a conceptual limit.

This is a reason to put the conceptual limits as
close to the data as possible. If they are enforced in
the database the rest of the software product
has to follow suit. Any other way isn't
garantueed, is it?

>>There is nothing specific to RM here.

[snip]
