Re: Why are data types size limited?

From: Joe \ <joe_at_bftsi0.UUCP>
Date: 2000/03/21
Message-ID: <sdfnuee1lul80_at_corp.supernews.com>#1/1


"Alan" <alanshein_at_erols.spambuster.com> wrote in message news:8b81fr$mkj$1_at_bob.news.rcn.net...

> Another reason (and I'm surprised Joe left this out) is to enforce data
> integrity (in this case, length) at the database level. If constraints
> cannot be supported at the database level, then _every_ program written in
> the enterprise would need to contain more-or-less matching constraints for
> each column. This would be at best a pain, and at worst impossible. When
> constraints are at the DB level, the programmers don't have to concern
> themseleves with enforcing them.

You can enforce memo length restrictions by adding a constraint such as textlength(email_address) < 4096 or something like that, so I wouldn't say that having a separate text type constrained to text lengths between 0 and 255, as many products do, is primarily driven by data integrity concerns. I still maintain it's primarily to facilitate B-tree-style indexing and is a performance issue, like why C/C++'s integers are often only 32 bits.

> Now, this does not explain why there is still an unreasonable limit or
> penalty on the various string types, though I suspect there is some
> underlying architectural reason for it, or surely it would have been "fixed"
> by now.

I suppose most developers get used to it, as I have, and rationalize it away using arguments such as, "who has an email address longer than 255 characters?"

--
Joe Foster <mailto:jfoster_at_ricochet.net>  Space Cooties! <http://www.xenu.net/>
WARNING: I cannot be held responsible for the above        They're   coming  to
because  my cats have  apparently  learned to type.        take me away, ha ha!
Received on Tue Mar 21 2000 - 00:00:00 CET

Original text of this message