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

Home -> Community -> Usenet -> c.d.o.server -> Re: DDL

Re: DDL

From: Howard J. Rogers <hjr_at_dizwell.com>
Date: Sun, 21 Nov 2004 19:37:37 +1100
Message-ID: <41a053d0$0$21134$afc38c87@news.optusnet.com.au>


David Fitzjarrell wrote:

> "Howard J. Rogers" <hjr_at_dizwell.com> wrote in message news:<419e6f7c$0$25116$afc38c87_at_news.optusnet.com.au>...
> 

>>Richard Foote wrote:
>>
>>>"David Fitzjarrell" <fitzjarrell_at_cox.net> wrote in message
>>>news:9711ade0.0411181508.16af523e_at_posting.google.com...
>>>
>>>
>>>>DA Morgan <damorgan_at_x.washington.edu> wrote in message
>>>>news:<1100761866.606335_at_yasure>...
>>>>
>>>>
>>>>>Rahul Jain wrote:
>>>>>
>>>>>
>>>>>
>>>>>>Why is DDL required to be the last statement in a transaction?
>>>>>
>>>>>It isn't. Where did you hear this?
>>>>
>>>>Presuming you mix DML and DDL in the same script or set of commands
>>>>(which, with a few limited exceptions like dropping or creating a temp
>>>>table, I question), to preserve the completeness (for lack of a better
>>>>word at the moment) of the transaction the DDL should be placed AFTER
>>>>any inserts, updates and/or deletes to data. The OP has worded this
>>>>incorrectly, and English, for non-English speakers (and some who claim
>>>>it as their primary tongue) is a cruel taskmistress. To be correct:
>>>>
>>>>If it is necessary to mix both DML and DDL the DDL should follow any
>>>>statements comprising a single transaction, as the DDL will issue a
>>>>commit prior to its execution, and another commit afterwards. Note
>>>>that the DDL will commit the prior transaction BEFORE it executes, so
>>>>it isn't truly a part of the transaction itself; the DDL starts a new
>>>>transaction comprised solely of the DDL.
>>>>
>>>>So, Howard is correct, and Daniel and Richard are also correct, since
>>>>the original question can be read in a number of ways. Howard read it
>>>>as I did initially, asking, "Why must I put my DDL at the end of a
>>>>transaction?" Daniel and Richard read it as it was written,
>>
>>Help me out here. Daniel and Richard said something like this too. So I
>>must be missing something.
>>
>>I can re-write the question to indicate what I took the question to
>>mean: "Why *is* DDL the last statement in a transaction" (Answer: It is
>>inevitably so, because it commits).
>>
>>What would be the re-write for Daniel and Richard's reading of the
>>question? I can't see one myself, unless it is: "Why does Oracle/the
>>documentation/support/Whoever insist/instruct me to place DDL at the end
>>of my transaction?"
>>
>>To which their answer was "they (ie, the documentation, Oracle support,
>>whoever, don't", though I think they could have helpfully added "but
>>even without someone making you do it, it will inevitably be the last
>>statement, because it commits".
>>
>>I don't see that the question is poorly written, uses "incorrect"
>>English, or can be neatly tossed aside as another product of 'eccentric'
>>Indians trying to be clever (see the frankly rather demeaning link in
>>Joel's post). The error here, IMHO, is in the assumptions of those doing
>>the reading. I'd like to try and understand what the other parties'
>>interpretation of the question was, therefore.
>>
>>
>>>>and their
>>>>responses are also correct, in that there is no requirement to include
>>>>DDL at the end of a transaction.
>>
>>So you are saying that their assumption is that the word "require"
>>implies that someone must be doing the "requiring". That accords with my
>>interpretation No. 2 above.
>>
>>Trouble is, that's not right.
>>
>>The word "requires" does not just mean "someone or something made it
>>obligatory" or "someone demanded it". It can also mean simply "it is
>>necessary". "Plants require sunlight", for example, does not imply that
>>God insisted it would be so, or legislated the fact. It just happens to
>>be the case that they do, indeed, need sunlight.
>>
>>In like manner, it just happens to be the case that DDL statements
>>terminate transactions. Therefore, it is entirely correct to state that
>>"DDL requires to be the last statement in a transaction". Which is
>>awfully close to what our OP actually wrote... quite correctly.
>>
>>Now, since this involves digging out the dictionaries, I expect this to
>>be the end of the matter, as it veers away from technical Oracle matters
>>and descends to the depths of textual interpretation. I just think
>>people (and I'm not directing this at you alone or indeed primarily,
>>David) should be a little more careful about claiming that what other
>>people have written is "poor English" or "incorrect grammar", or to
>>reach for what seems to be fast becoming the 'funny little colonials'
>>defence.
>>
> 
> 
> I posted no defence.  

As I said at that point, I wasn't commenting directly in your direction. It was, I hoped, a fairly obvious reference to the 'Indian English' article that Joel posted. If it was too obscure a reference, I apologise.

> I simply imterpreted the question in two
> differing ways, one of which lead me to think this question was
> misworded.  Possibly I misstated my thoughts and unintentionally
> accused the OP of "poor English".  That was certainly NOT my intent. 
> If such is the case, I humbly apologise to the OP.
> 
> As to the OP's question, nothing in the documentation states such a
> fact in those exact words; it DOES state that DDL commits before it
> executes and immediately thereafter.  I have misread documentation
> more than once, and extracted from such misreading a notion that was
> not entirely correct.  I expected the OP may have done the same, and
> worded his question in light of that misreading.  Note I said
> 'expected'; this implies assumptions on my part.  You, too, have made
> an assumption, the assumption the OP wrote his question having your
> train of thought.  Since the OP has not bothered to respond to this,
> much less attempt to clarify his question, it would appear that either
> interpretation can be considered valid.  Which in turn, validates both
> sets of responses.

I think that's a cop-out, though (it's one Daniel is making, too, incidentally). There are two possible interpretations of the questions. One is "why must I end an 'update emp...' statement with an 'alter table... ' commmand. That is, in effect, what Richard and Daniel read into it. And yes, of course that's an exaggeration, but I can't think how else to phrase Richard's suggestion that the OP was asking why he had to end a DML statement with a DDL one any more clearly.

The other is "why, if I am issuing a mix of DML and DDL, do the DDL commands have to be at the end of the list of commands".

You are right that both interpretations are possible. My point is that one is rather more probable as the 'correct' interpretation than the other.

And we ought to be free to discuss whether that is indeed more probable without criticising the OP's use of English, or without simply trying to squash the discussion by posting (as Daniel has done), 'Richard is right, and you should just shut up and thank him for it'.

And I have continued the debate thus far because I don't think trying to understand what people write is off-topic. And I also think it is important to point out the latent racism underlying some of the comments made in this thread (and not by you).

Is this issue basically trivial in itself? Yes. But what has happened in the thread is a valid topic of discussion in itself.

> I do not wish to drag this on any longer.

Fair enough. But let's not finish it off by leaving the impression that Richard and Daniel 'read what was written', whereas I just went doolally and made it all up. Let's not leave the topic with the impression that Indians can't speak English properly.

> I only want it known I had
> no ill intentions in my post, toward the OP or toward any other
> participant in this thread.  I thought my contribution through quite
> carefully and read and re-read before finally posting.  Carelessness
> in responding means, to me, basically 'shooting from the hip', which I
> did not do.  I'm sorry, Howard, if you firmly feel as though I did.

I didn't at all. I have indeed been critical in this thread because, despite asking for clarification in a one-liner re-wording, Richard couldn't or wouldn't do it but merely referred me to his previous posts   which, if they had been clear on the matter, I wouldn't have needed referring to any way. Because, too, Daniel has done his usual "I am ending this thread" crap. Because Joel has posted a "Indian English is so 'eccentric'" link.

This entire diversion only arose, you may recall, because in response to my 'because DDL commits', Daniel decided to don the pontifical robes: 'true, Howard, but that has nothing to do with the original post'.

As I have attempted to point out, it has everything to do with the post under one (IMHO high plausible) interpretation of the OP's intent.

Daniel would rather not admit that. And you yourself wrote "Daniel and Richard read it as it was written". To which my only point directed entirely at you was: No, they didn't.

Regards
HJR

> 

>>Regards
>>HJR
> 
> 
> David Fitzjarrell
Received on Sun Nov 21 2004 - 02:37:37 CST

Original text of this message

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