Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: inline out-of-line
"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