1、 KSKSKSKSKSKSKSK KSKSKS KSKSK KSKS KSK KS KS X ISO/IEC 9075 13 SQL 13: SQL (SQL/JRT) KS X ISO/IEC 9075 13:2010 2010 12 31 http:/www.kats.go.krKS X ISO/IEC 9075 13:2010 : e- ( ) ( ) () () ( ) : () () ( ) : (http:/www.standard.go.kr) : :2003 12 29 :2010 12 31 2010-0709 : e- : () ( 02-509-7262) (http:/
2、www.kats.go.kr). 10 5 , . KS X ISO/IEC 9075 13:2010 i v vi 1 1 2 1 2.1 ISO IEC .1 2.2 .1 3 , .2 3.1 .2 3.2 .4 4 4 4.1 5 4.2 SQL- 6 4.3 8 4.4 SQL .8 4.5 .9 4.6 .10 4.7 11 4.8 .11 4.9 .15 4.10 .16 4.11 JAR .16 5 .17 5.1 17 5.2 .18 6 .19 6.1 .19 6.2 .19 7 20 7.1 .20 8 21 8.1 .21 8.2 22 8.3 23 8.4 31 8.
3、5 .31 8.6 37 9 .43 9.1 43 9.2 .44 9.3 .44 9.4 .45 KS X ISO/IEC 9075 13:2010 ii 9.5 .48 9.6 51 9.7 51 9.8 .52 9.9 55 9.10 55 9.11 56 9.12 57 10 .58 10.1 58 10.2 .58 10.3 59 11 .60 11.1 SQLJ.INSTALL_JAR 60 11.2 SQLJ.REPLACE_JAR 61 11.3 SQLJ.REMOVE_JAR .63 11.4 QLJ.ALTER_JAVA_PATH 64 12 .66 12.1 66 12.
4、2 .66 13 .69 13.1 JAR_JAR_USAGE 69 13.2 JARS 70 13.3 METHOD_SPECIFICATIONS .70 13.4 ROUTINE_JAR_USAGE .71 13.5 TYPE_JAR_USAGE 71 13.6 USER_DEFINED_TYPES .72 13.7 .72 14 .74 14.1 JAR_JAR_USAGE 74 14.2 JARS .75 14.3 METHOD_SPECIFICATIONS .75 14.4 OUTINE_JAR_USAGE .76 14.5 ROUTINES 77 14.6 TYPE_JAR_USA
5、GE 77 14.7 USAGE_PRIVILEGES 78 14.8 USER_DEFINED_TYPES .79 15 .80 15.1 SQLSTATE .80 16 81 16.1 SQL/JRT .81 16.2 QL/JRT 81 16.3 SQL/JRT .81 A( ) .82 B( ) .87 KS X ISO/IEC 9075 13:2010 iii C( ) .90 D( ) .91 E( ) KS X ISO/IEC 9075: 2003 92 F( ) SQL 93 G( ) .94 H( ) .95 H.1 95 H.2 95 H.3 : region correc
6、tStates 96 H.4 SQL region correctStastes .97 H.5 region correctStates SQL .98 H.6 : bestTwoEmps .99 H.7 bestTwoEmps CREATE PROCEDURE best2101 H.8 best2 102 H.9 : orderedEmps 102 H.10 orderedEmps CREATE PROCEDURE rankedEmps .104 H.11 rankedEmps 105 H.12 SQL .105 H.13 .107 H.14 CREATE 108 H.15 NULL RE
7、TURNS NULL 109 H.16 .111 H.17 SQL .112 H.18 SQL .113 H.19 SQL .113 H.20 .114 H.21 115 H.22 115 H.23 118 H.24 120 H.25 120 I( ) .122 I.1 122 I.2 122 I.3 SQL Address Address2Line 124 I.4 Address Address2Line CREATE TYPE.124 I.5 SQL .126 I.6 126 I.7 GRANT REVOKE .128 I.8 128 I.9 .130 I.10 SELECT, INSER
8、T UPDATE.130 I.11 SQL 131 I.12 .132 I.13 SQL 132 KS X ISO/IEC 9075 13:2010 iv I.14 .134 I.15 .134 I.16 .135 I.17 SQL/JRT 137 I.18 138 I.19 SQL/JRT .139 142 KS X ISO/IEC 9075 13:2010 .143 1 31 2 66 3 SQLSTATE .80 4 SQL/JRT 81 5 .93 KS X ISO/IEC 9075 13:2010 v . SQL SQL . KS X ISO/IEC 9075 13 . A( ) S
9、QL B( ) C( ) D( ) E( ) KS X ISO/IEC 9075: 2003 F( ) SQL G( ) 3 H( ) I( ) KS X ISO/IEC 9075 “ SQL” . 1: (SQL/ ) 2: (SQL/ ) 3: (SQL/CLI) 4: (SQL/PSM) 9: (SQL/MED) 10: (SQL/OLB) 11: (SQL/Schemata) 13: SQL (SQL/JRT) 14: XML (SQL/XML) KS X ISO/IEC 9075 13:2010 vi 2008 3 ISO/IEC 9075 13, SQL Routines and
10、Types Using the Java Programming Language(SQL/JRT) . KS X ISO/IEC 9075 . 1) 1 , “ ” KS X ISO/IEC 9075 . 2) 2 , “ ” KS X ISO/IEC 9075 . 3) 3 , “ , ” KS X ISO/IEC 9075 . 4) 4 , “ ” . 5) 5 , “ ” . 6) 6 , “ ” . 7) 7 , “ ” . 8) 8 , “ ” . 9) 9 , “ ” . 10) 10 , “ ” SQL . 11) 11 , “ ” . 12) 12 , “ ” KS X IS
11、O/IEC 9075 . 13) 13 , “ ” . 14) 14 , “ ” (base) . 15) 15 , “ ” SQLSTATE . 16) 16 , “ ” KS X ISO/IEC 9075 . 17) A( ): “SQL ” SQL . 18) B( ): “ ” KS X ISO/IEC 9075 , , , SQL- , . 19) C( ): “ ” KS X ISO/IEC 9075 , , , SQL- , . 20) D( ): “ ” KS X ISO/IEC 9075 . 21) E( ): “KS X ISO/IEC 9075: 2003 ” KS X
12、ISO/IEC 9075 . 22) F( ): “SQL ” KS X ISO/IEC 9075 SQL . SQL . 23) G( ): “KS X ISO/IEC 9075 13 ” . KS X ISO/IEC 9075 . . KS X ISO/IEC 9075 13:2010 vii 24) H( ): “ ” KS X ISO/IEC 9075 SQL . 25) I( ): “ ” KS X ISO/IEC 9075 SQL . KS X ISO/IEC 9075 13:2010 SQL 13: SQL (SQL/JRT) Information technology Dat
13、abase languages SQL Part 13: SQL Routines and Types Using the Java Programming Language(SQL/JRT) 1 SQL- (SQL-invoked) SQL ( ). 2 . . ( ) . 2.1 ISO IEC KS X ISO/IEC 9075 1: 2009, SQL 1: (SQL/ ) KS X ISO/IEC 90750 2: 2009, SQL 2: (SQL/ ) KS X ISO/IEC 9075 10: 2007, SQL 10: (SQL/OLB) KS X ISO/IEC 9075
14、11: 2005, SQL 11: (SQL/ ) 2.2 Java , 3 , James Gosling, Bill Joy, Guy Steele, Gilad Bracha, (Prentice Hall), 2005 6 14 , ISBN 0-321-24678-0 JVM , 2 , Tim Lindholm Frank Yellin, (Addison-Wesley), 1999, ISBN 0-201-43294-3, Clarifications and Amendments to the Java Virtual Machine Specification , http:
15、/ jvmsclarify.html J2SE 2 5.0 API , http:/ Serialization , 1.5.0 , http:/ spec/serial-TOC.html KS X ISO/IEC 9075 13:2010 2 JDBC JDBC 4.0 , 1.0 , Lance Andersen, , 2006 11 7 3 , KS X ISO/IEC 9075 2 3. “ , ” . 3.1 KS X ISO/IEC 9075 2 3.1 “ ” . 3.1.1 Java Java . 3.1.1.1 (block) 3.1.1.2 (class declarati
16、on) 3.1.1.3 (class instance) 3.1.1.4 (class variable) 3.1.1.5 (field) 3.1.1.6 (instance initializer) 3.1.1.7 (instance variable) 3.1.1.8 (interface) 3.1.1.9 (local variable) 3.1.1.10 (nested class) 3.1.1.11 (package) 3.1.1.12 (static initializer) 3.1.1.13 (subpackage) 3.1.2 JVM JVM . 3.1.2.1 (class
17、file) 3.1.2.2 (Java Virtual Machine) 3.1.3 KS X ISO/IEC 9075 13:2010 3 . 3.1.3.1 (default connection) URL jdbc: default: connection SQL , SQL SQL JDBC (URL RFC2368 RFC3986 ) 3.1.3.2 (deployment descriptor) SQLJ.INSTALL_JAR SQLJ.REMOVE_JAR 0 SQL 3.1.3.3 (deployment descriptor file) JAR . JAR J2SE jav
18、a.util.jar SQLJDeploymentDescriptor: TRUE . 3.1.3.4 (external Java data type) SQL 3.1.3.5 (external Java routine) LANGUAGE JAVA PROCEDURE FUNCTION 3.1.3.6 JAR (installed JAR) SQLJ.INSTALL_JAR SQLJ.REPLACE_JAR SQL SQL JAR 3.1.3.7 (Java Archive: JAR) J2SE java.util.zip 0 ser 0 zip . JAR SQL . 3.1.3.8
19、JVM JVM 3.1.3.9 ser (ser file) Serialization KS X ISO/IEC 9075 13:2010 4 3.1.3.10 (subject Java class) JAR 3.1.3.11 (subject Java class name) 3.1.3.12 (system class) , JAR . 3.2 KS X ISO/IEC 9075 2 3.3 “ ” . 3.2.1 (Specification of built-in procedures) . : : SQL . , , . . : : (invocation) . , . : SQ
20、L . , , . 3.2.2 (Specification of deployment descriptor files) . : : JAR : BNF : : SQL 4 KS X ISO/IEC 9075 2 4. “ ” . KS X ISO/IEC 9075 13:2010 5 4.1 . . . , 0 , 0 , 0 , 0 , 0 , 0 , 0 (constructor) . . static . . . for (local) . . (strongly typed) . . java.lang.Object . java.lang.Object . . . B A B
21、C C A C B A . B A C B C C A B A . B B . . . . . “new” . , , . , . 0 , 0 , 0 . . . , . (import) . KS X ISO/IEC 9075 13:2010 6 , , public, private, protected . public . private . protected . public, private, protected . . 0 0 . . J2SE java.io.Serializable java.io.OutputStream java.io.InputStream . J2SE java.io.OutputStream java.io.InputStream , .