Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Java Databases > Re: Global tem*...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 8 of 9 Topic 3616 of 3876
Post > Topic >>

Re: Global tem****ary tables in Java DB -- Apache Derby

by CJ <spambox1@[EMAIL PROTECTED] > Dec 17, 2007 at 12:01 PM

On Dec 15, 2:05 pm, Dyreatn...@[EMAIL PROTECTED]
 wrote:
> CJ <spamb...@[EMAIL PROTECTED]
> writes:
>
> [snip]
>
> > No, dt, I type in the jist of the logic rather than cut/paste.  After
> > reading again the section, I found that adding "ON COMMIT PRESERVE
> > ROWS," or as you noted turning off auto commit "corrects" my bug.
> > Unfortunately, I also read that though the syntax is "declare GLOBAL
> > tem****ary table" the table is not truly global, but specific to the
> > connection from which it was created.
>
> This limitation is imposed by the SQL standard AFAICT. In SQL all
> tem****ary tables, local or global, are local to the session.
>
> "... the contents of a _global_ tem****ary table or a created local
> tem****ary table _cannot_ be shared between SQL sessions like the
> contents of a persistent base table. In addition, the contents of a
> created _local_ temparary table cannot be shared between modules or
> embedded SQL programs in a single SQL session." (Understanding the new
> SQL: A complete guide, Melton & Simon, 1993)
>
> Don't ask me what "modules and embedded SQL programs" would be in the
> context of JDBC :)
>
> > I was looking to create that
> > would not become part of the Java DB "database" and thus not exist
> > when the JVM terminates abnormally.  The data in the "tem****ary table"
> > is truly tem****ary, but needed so long as the JVM is operating.
> > However the tem****ary table data should not persist in the DB.
>
> The tem****ary table disappears as soon as you close the connection. But
> you cannot share the temp table with other connections, so if that is
> what you need I guess you are out of luck :(
>
> > Because of the limitations of "declare global tem****ary table" I will
> > implement the table another way.
>
> I'm sorry it doesn't work for you. Btw. the DECLARE GLOBAL TEM****ARY
> syntax is not standard SQL. You can log that as a Java DB/Derby bug if
> you want. See
>
> http://db.apache.org/derby/DerbyBugGuidelines.html
>
> --
> dt
>
> Questions about Derby/Java DB? Please
visithttp://db.apache.org/derby/derby_mail.html

I have use SQL engines that use naming conventions such as
"#tableName" and "##tableName." In the former, one pound character (#)
the behavior is similar to the Derby declared global tem****ary table,
the latter, the double pound character (##) creates a tem****ary table
that is available to all within the scope of the schema.

IMHO, something labeled as "global" that restricts access to the
entity that created is not global in any definition I can imagine.

cj
 




 9 Posts in Topic:
Global temporary tables in Java DB -- Apache Derby
CJ <spambox1@[EMAIL PR  2007-12-11 12:26:31 
Re: Global temporary tables in Java DB -- Apache Derby
Dyreatnews@[EMAIL PROTECT  2007-12-12 13:05:31 
Re: Global temporary tables in Java DB -- Apache Derby
CJ <spambox1@[EMAIL PR  2007-12-14 07:07:40 
Re: Global temporary tables in Java DB -- Apache Derby
Dyreatnews@[EMAIL PROTECT  2007-12-14 18:26:36 
Re: Global temporary tables in Java DB -- Apache Derby
CJ <spambox1@[EMAIL PR  2007-12-14 14:28:20 
Re: Global temporary tables in Java DB -- Apache Derby
Lew <lew@[EMAIL PROTEC  2007-12-14 19:17:09 
Re: Global temporary tables in Java DB -- Apache Derby
Dyreatnews@[EMAIL PROTECT  2007-12-15 20:05:10 
Re: Global temporary tables in Java DB -- Apache Derby
CJ <spambox1@[EMAIL PR  2007-12-17 12:01:55 
Re: Global temporary tables in Java DB -- Apache Derby
Dyreatnews@[EMAIL PROTECT  2007-12-18 17:21:10 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Dec 3 22:30:00 CST 2008.