Re: Why all the max length constraints?

From: dawn <dawnwolthuis_at_gmail.com>
Date: 29 May 2006 11:03:48 -0700
Message-ID: <1148925828.841431.188460_at_38g2000cwa.googlegroups.com>


Tony Andrews wrote:
> dawn wrote:
> > Tony D wrote:
> > > given that the premise it starts from is thoroughly discounted in at
> > > least one of the books Dawn claims to have read,
> >
> > I read 'em, but didn't memorize 'em, feel free to point me to a page
> > number that answers my question.
>
> There is no such page, apparently. You have said elsewhere in this
> thread that you know that:
>
> > > "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*."
>
> You said:
>
> > That I know. That does not answer my question.
>
> So it is clear that you DO know that there is nothing in RM that would
> require a DBMS to implement length constraints on attributes, yet you
> continue to deny that you know it.

I know that there is nothing in the RM, the theory, that would require lengths. I don't know if there is something about _implementing_ the RM that would come close to requiring or at least really encourage such constraints.

> Your question seems to boil down to: why *can* you constraint the
> length of strings in a SQL DBMS but you *can't* in an MV DBMS?

Nope. I understand why you cannot do so within the MV DBMS -- the schema are not prescriptive, but descriptive. Many "vocabulary items" (dictionary items, attribute metadata) may describe the very same data, for example.

Similarly, I understand why you can constrain the max length in a SQL DBMS. What I don't know is whether you could have an implementation of the RM (or close approximation thereof) where providing a max length was optional and not the norm, without some significant penalty.

> It seems a bit like asking "why does car X offer climate control while
> car Y doesn't? What is it about car X that makes it /need/ climate
> control while car Y doesn't".

Not really. I'm only interested in car RDBMS in this question, using car MV only so possibly someone could understand how there are other options if they were not otherwise aware of such (we can all get in a mindset where we only see that which we know). I'm interested in whether it is essential, really important, enticing, or just tradition that the car RDBMS designers always seem to (first asking if I am correct in my observation) have a particular feature.

> Your serif / sans-serif analogy doesn't make sense either. SQL DBMSs
> don't impose length constraints on columns "by default". In each and
> every case the constraint is specified by the person creating the
> table.

Yes, it is the feature of "expecting" the developer to do this that is of interest to me.

> If it did impose them by default then presumably columns would
> tend to all have the same length constraint, e.g. 50, whereas a cursory
> glance at a typical database shows lots of different length constraints
> being used.

We might eventually have a similar language on this. I think I am starting to understand you and hope we are getting somewhere in the other direction too. --dawn Received on Mon May 29 2006 - 20:03:48 CEST

Original text of this message