Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: inline out-of-line

Re: inline out-of-line

From: Vu Pham <vu_at_sivell.com>
Date: Tue, 17 Feb 2004 11:23:26 -0600
Message-ID: <c0tio0$1b1eca$1@ID-219297.news.uni-berlin.de>

"Daniel Morgan" <damorgan_at_x.washington.edu> wrote in message news:1077033766.662297_at_yasure...
> Vu Pham wrote:
> > Sorry for another stupid question. Searched but not yet found the
answer.
> >
> > Is there any advantage/disadvatange between inline and out-of-line
> > declaration of constraints ?
> >
> > Thanks,
> >
> > Vu
>

Daniel, thanks for your explanation.

> As I've made obvious in numerous postings I dislike in-line
> constraint declarations. To use them to fully define a constraint
> with name, condition, index, storage, etc. on a decent sized table
> makes the CREATE TABLE large and difficult to maintain.

Yes, I understand this paragraph.

> The second reason I don't like them is that when moving code to
> production DBAs should have the ability to alter tablespace and
> storage parameters. Making them do so inside of a large block of
> DDL makes it easier for mistakes to be made.

Could you please tell me a little bit more about this ? I can't find the relationship between tablespace and constraints. ( You can see that I am just a rookie in this field ).

> Finally consider the possibility that a CREATE TABLE and many of
> its in-line constraints may be valid but one may have a problem.
> Do you want the entire CREATE to fail including all views and code
> dependent upon the table or just the single, easy to fix, constraint
> creation?

Thanks for mentioning this. When using the out-of-line constraints, I often put them at the end , and included inside the CREATE clause, of the tables. Your reply reminds me about the ALTER TABLE ADD CONSTRAINT . I just made this change and the sql files look easier to understand now.

Is it correct when I say that the advatange of the inline constraint clause is to imply the column type ? I mean the developers do not need to declare the field types that are involved into constraints at different locations. They need to do this for out-of-line contrainsts.

Vu Received on Tue Feb 17 2004 - 11:23:26 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US