Re: Why all the max length constraints?

From: mAsterdam <mAsterdam_at_vrijdag.org>
Date: Mon, 29 May 2006 00:18:04 +0200
Message-ID: <447a20e9$0$31637$e4fe514c_at_news.xs4all.nl>


dawn wrote:
> mAsterdam wrote:

>>dawn wrote:
>>>mAsterdam wrote:
>>>>dawn wrote:
>>>>>mAsterdam wrote:
>>>>>>dawn wrote:
>>>>>>>Marshall wrote:
>>>>>>>>dawn wrote:
>>>>>>>>
>>>>>>>>>[why all the length constraints?]
>>
>>>>>... even in cases where there is no conceptual max on
>>>>>a value (last name, for example), a max length is chosen for the
>>>>>attribute definition to the dbms.
>>>>
>>>>"is chosen" by whom? Who made the choice?
>>>
>>>The application software designers in line with their users (not those
>>>who wrote the dbms toolset, if that is the question)
>>
>>Yep, that was the question.
>>
>>I only don't like the "in line with their users" part
>>- how can they be in line with their users and introduce
>>constraints which are not in the conceptual model?

>
> Yes, that is a problem.

Not really.

The constraints chosen by
"the application software designers in line with their users" are part of the conceptual model.
A "max length .. for the attribute definition to the dbms.", "even in cases where there is no conceptual max on a value (last name, for example)",
OTOH, is not.
The remark "in line with their users" simply contradicts your previously stated assumption "there is no conceptual max".

> However, I like to keep the conceptual model
> as pure from implementation (e.g. choice of database product)

[Topic switch alert]

Every product, capable of enforcing the constraints from the conceptual model will do. In practise this means that unenforcable constraints are scratched from the requirements.
Back on topic: Often the conceptual model will not be a deliverable or even explicit but re-engineered from the implementation when it matters. These databases can not be qualified as designed "in line with their users".

> as
> feasible, so you would not want to introduce unnecessary (from a
> business perspective) constraints there. It was when examining the
> "mapping" (perhaps too strong a word, possibly lacking the suggestion
> that there is creativity in the design when there is) from conceptual
> to implementation (aka logical data model) with a fine tooth comb that
> I noticed this introduction.
> But I do think that design and not just conceptual model need to be "in
> line with their users" too.

Yep. You should really read up on ORM: http://www.orm.net/

> You simply have to go back to them beyond
> the conceptual model and include them in the
> design-as-the-computer-needs-it while doing design for a specific
> implementation of the model. In theory (although rarely in practice)
> the choice of target DBMS need not be made prior to the conceptual
> model being complete, right?

Last time I have seen that (some level of completeness) from close-by is long ago. Apart from the dropped availability threshold (since when can we download a full-fledged dbms just to try it?) there is also something called Analysis-paralysis
http://en.wikipedia.org/wiki/Analysis_paralysis and the IKIWISI syndrome.
http://www.nuigalway.ie/bis/mlang/lecture_notes/systems_development/Rapid_and_Agile_Approaches.ppt

The timing of these decisions need to be carefully balanced: http://agiledevelopmentconference.com/2003/files/P4Paper.pdf

>>It sounds as if they made it up themselves.
>>Maybe for bad reasons, maybe for good reasons,
>>but, in the context of this question (max length
>>in the database, but not in the conceptual model)
>>/not/ "in line with their users".

[snip]

>>>... the database designers select max lengths, and
>>>the dbms designers choose whether and how big a
>>>penalty would be if size were not declared.
>>
>>How so?

>
> By their design of the DBMS. If it is designed such that specifying
> attribute max length constraints gives some benefit to their users (aka
> software developers) or that their users must specify such constraints,
> that would be different than if they came up with a design where there
> was no benefit to having developers specify such. (Was that clear or
> not?)

Hmm... it is as if these nasty DBMS designers play a giant trick by awarding benefits to those who specify max length constraints. I don't buy it.

>>>>They (the designers of the dbms) have the responsability to
>>>>provide facilities for the db designers to specify them,
>>>>and the facilities to enforce the specified constraints.
>>>
>>>And the option to provide a feature permitting app or db designers not
>>>to specify a size., the option to default to variable length unless
>>>otherwise specified, for example.
>>
>>And suddenly it's about providing clever defaults!

>
>
> I somehow don't think that is what a Pick DBMS does. So, I don't think
> that is what it is about. As always, I could be missing something.

Well, to me it looks like your views on problems are heavily biased by the solutions you are most comfortable with. You are not alone. Received on Mon May 29 2006 - 00:18:04 CEST

Original text of this message