Re: Why all the max length constraints?
Date: 28 May 2006 08:20:10 -0700
Message-ID: <1148829610.744003.306180_at_u72g2000cwu.googlegroups.com>
Yes, it is a rather silly question. It's an almost impressively silly question because if, as you've mentioned elsewhere, you've read TTM, you should have seen stated in several different ways the assertion that the relational model is orthogonal to the type system. A quick Google found an interview (http://www.dbmsmag.com/int9410.html) discussing an earlier version of the book, where Date says :
"The reason I say the ideas of object-oriented (at least the good ones)
are orthogonal to the ideas of the relational model is that *nowhere
does the relational model prescribe what data types you have*."
Unless the subtext was to have another tussle over the old "what's a scalar type ?" question ...
If you're asking "why do (at least the majority) of SQL databases
require length constraints", then it's very probably to do with the way
those products chose to represent tables on disk. There may also be
"bleed" from other language designs into SQL - ISTR Joe Celko defending
the SQL types on the grounds that they were chosen to fit well with
existing programming languages in which SQL would be embedded (and in
passing applying a handbrake to any other language with a different
type system you might have the misfortune to want/need to use with an
SQL database).
- Tony