Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

SQL/JRT

From Wikipedia, the free encyclopedia
SQL extension

SQL/JRT, orSQL Routines and Types for the Java Programming Language, is an extension to theSQL standard first published asISO/IEC 9075-13:2002 (part 13 ofSQL:1999). SQL/JRT specifies the ability to invoke staticJava methods as routines from within SQL applications, commonly referred to as "Javastored procedures". SQL/JRT also calls for the ability to use Java classes as SQLstructured user-defined types. The two parts of the extension originate from the earlierANSISQLJ part 1 and 2 standards (not to be confused with SQLJ part 0, which defined an embedding of SQL into Java, later standardized by ISO asSQL/OLB).

Example

[edit]

SQL/JRT allows a Java function to be called from SQL code like this:[1]

CREATEFUNCTIONsinh(vDOUBLE)RETURNSDOUBLELANGUAGEJAVADETERMINISTICNOSQLEXTERNALNAME'CLASSPATH:java.lang.Math.sinh'SELECTsinh(doublecolumn)FROMmytable

SQL/JRT also allows Java code to dynamically generate tables using ajava.sql.ResultSet object. The result sets returned are converted to SQL tables and can be used anywhere a table or view can be used.[1]

Implementations

[edit]
[icon]
This sectionneeds expansion. You can help byadding missing information.(November 2012)

SQL/JRT stored procedures are implemented inHSQLDB.[1] Java stored procedures have also been implemented in Oracle'sJServer (or Aurora JVM), which was introduced in theOracle Database version 8i in 1999;[2][3] it is now calledOracle JVM.[4]IBM DB2 also supported Java stored procedures since about 1998, although using an external JVM (at that time).[5]

See also

[edit]

References

[edit]
  1. ^abcHSQLDB manual
  2. ^Bulusu Lakshman (2002).Oracle & Java Development. Sams Publishing. p. 6.ISBN 978-0-672-32117-7.
  3. ^The Aurora JVM and Its Components, Oracle Corp.
  4. ^Rick Greenwald; Robert Stackowiak; Jonathan Stern (2008).Oracle Essentials: Oracle Database 11g. O'Reilly Media, Inc. p. 323.ISBN 978-0-596-51454-9.
  5. ^Don Chamberlin (1998).A Complete Guide to DB2 Universal Database. Morgan Kaufmann. p. 565.ISBN 978-1-55860-482-7. Retrieved16 November 2012.

External links

[edit]
Versions
Keywords
Related
ISO/IEC SQL parts


Stub icon

Thisdatabase-related article is astub. You can help Wikipedia byadding missing information.

Retrieved from "https://en.wikipedia.org/w/index.php?title=SQL/JRT&oldid=1323281707"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp