BS PD ISO IEC TR 19075-4-2015 Information technology Database languages SQL Technical Reports SQL with Routines and types using the JavaTM programming language《信息技术 数据库语言 SQL技术报告 使用JavaTM编程语言且带有例程.pdf

上传人:孙刚 文档编号:398671 上传时间:2018-10-19 格式:PDF 页数:66 大小:2MB
下载 相关 举报
BS PD ISO IEC TR 19075-4-2015 Information technology Database languages SQL Technical Reports SQL with Routines and types using the JavaTM programming language《信息技术 数据库语言 SQL技术报告 使用JavaTM编程语言且带有例程.pdf_第1页
第1页 / 共66页
BS PD ISO IEC TR 19075-4-2015 Information technology Database languages SQL Technical Reports SQL with Routines and types using the JavaTM programming language《信息技术 数据库语言 SQL技术报告 使用JavaTM编程语言且带有例程.pdf_第2页
第2页 / 共66页
BS PD ISO IEC TR 19075-4-2015 Information technology Database languages SQL Technical Reports SQL with Routines and types using the JavaTM programming language《信息技术 数据库语言 SQL技术报告 使用JavaTM编程语言且带有例程.pdf_第3页
第3页 / 共66页
BS PD ISO IEC TR 19075-4-2015 Information technology Database languages SQL Technical Reports SQL with Routines and types using the JavaTM programming language《信息技术 数据库语言 SQL技术报告 使用JavaTM编程语言且带有例程.pdf_第4页
第4页 / 共66页
BS PD ISO IEC TR 19075-4-2015 Information technology Database languages SQL Technical Reports SQL with Routines and types using the JavaTM programming language《信息技术 数据库语言 SQL技术报告 使用JavaTM编程语言且带有例程.pdf_第5页
第5页 / 共66页
亲,该文档总共66页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述

1、BSI Standards Publication PD ISO/IEC TR 19075-4:2015 Information technology Database languages SQL Te c h n i c a l R e p o r t s Part 4: SQL with Routines and types using the Java TMprogramming languagePD ISO/IEC TR 19075-4:2015 PUBLISHED DOCUMENT National foreword This Published Document is the UK

2、 implementation of ISO/IEC TR 19075-4:2015. The UK participation in its preparation was entrusted to Technical Committee IST/40, Data management and interchange. A list of organizations represented on this committee can be obtained on request to its secretary. This publication does not purport to in

3、clude all the necessary provisions of a contract. Users are responsible for its correct application. The British Standards Institution 2015. Published by BSI Standards Limited 2015 ISBN 978 0 580 85112 4 ICS 35.060 Compliance with a British Standard cannot confer immunity from legal obligations. Thi

4、s Published Document was published under the authority of the Standards Policy and Strategy Committee on 31 July 2015. Amendments/corrigenda issued since publication Date Text affectedInformation technology Database languages SQL Technical Reports Part 4: SQL with Routines and types using the Java T

5、Mprogramming language Technologies de linformation Langages de base de donnes SQL rapports techniques Partie 4: SQL avec des Routines et Types Utilisant le Langage de Programmation de Java TM TECHNICAL REPORT ISO/IEC TR 19075-4 First edition 2015-07-01 Reference number ISO/IEC TR 19075-4:2015(E) ISO

6、/IEC 2015 ii ISO/IEC 2015 All rights reserved COPYRIGHT PROTECTED DOCUMENT ISO/IEC 2015, Published in Switzerland All rights reserved. Unless otherwise specified, no part of this publication may be reproduced or utilized otherwise in any form or by any means, electronic or mechanical, including phot

7、ocopying, or posting on the internet or an intranet, without prior written permission. Permission can be requested from either ISO at the address below or ISOs member body in the country of the requester. ISO copyright office Ch. de Blandonnet 8 CP 401 CH-1214 Vernier, Geneva, Switzerland Tel. +41 2

8、2 749 01 11 Fax +41 22 749 09 47 copyrightiso.org www.iso.org ISO/IEC TR 19075-4:2015(E) PD ISO/IEC TR 19075-4:2015Contents Page Foreword. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

9、 . . . . v Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vi 1 Scope. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

10、 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2 Normative references. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3 2.1 ISO and IEC standards. . . . . . . . . . . . . . . . . . . . . .

11、 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2.2 Other international standards. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 3 Routines tutorial. . . . . . . . . . . . .

12、 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5 3.1 Technical components. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 3.2 Overview

13、. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 3.3 Example Java methods: region and correctStates. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

14、. . . 6 3.4 Installing region and correctStates in SQL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 3.5 Defining SQL names for region and correctStates. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

15、 . . . 8 3.6 A Java method with output parameters: bestTwoEmps. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 3.7 A CREATE PROCEDURE best2 for bestTwoEmps. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3.8 Calling the

16、 best2 procedure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.9 A Java method returning a result set: orderedEmps. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.10 A CR

17、EATE PROCEDURE rankedEmps for orderedEmps. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 3.11 Calling the rankedEmps procedure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 3.12 Overloading Java

18、method names and SQL names. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 3.13 Java main methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 3.14 Java meth

19、od signatures in the CREATE statements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 3.15 Null argument values and the RETURNS NULL clause. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 3.16 Static variables. . . . .

20、. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21 3.17 Dropping SQL names of Java methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 3.18 Remov

21、ing Java classes from SQL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 3.19 Replacing Java classes in SQL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

22、23 3.20 Visibility. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 3.21 Exceptions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

23、. . . . . . . . . . . . . . . . . . . . . . . 24 3.22 Deployment descriptors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .25 3.23 Paths. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

24、. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 3.24 Privileges. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.25 Information Schema. . . . . . . . .

25、. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .30 4 Types tutorial. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 4.1 Ove

26、rview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 4.2 Example Java classes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

27、. . . . . . . . . . . . 33 ISO/IEC 2014 All rights reserved Contents iii DTR 19075-4:2014(E) PD ISO/IEC TR 19075-4:2015 ISO/IEC TR 19075-4:2015(E) 4.3 Installing Address and Address2Line in an SQL system. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 4.4 CREATE T

28、YPE for Address and Address2Line. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 4.5 Multiple SQL types for a single Java class. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 4.6 Collapsing s

29、ubclasses. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 4.7 GRANT and REVOKE statements for data types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 4.8 Deploym

30、ent descriptors for classes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 4.9 Using Java classes as data types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

31、41 4.10 SELECT, INSERT, and UPDATE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 4.11 Referencing Java fields and methods in SQL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

32、. 43 4.12 Extended visibility rules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 4.13 Logical representation of Java instances in SQL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

33、. . . . . . . . 44 4.14 Static methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 4.15 Static fields. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

34、 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 4.16 Instance-update methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 4.17 Subtypes in SQL/JRT data. . . . . . . . . . . . . . . . . . . . . . .

35、. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 4.18 References to fields and methods of null instances. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 4.19 Ordering of SQL/JRT data. . . . . . . . . . . . . . . . . . .

36、. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 iv SQL with Routines an

37、d Types Using the Java Programming Language ISO/IEC 2014 All rights reserved DTR 19075-4:2014(E) PD ISO/IEC TR 19075-4:2015 ISO/IEC TR 19075-4:2015(E) Foreword ISO (the International Organization for Standardization) and IEC (the International Electrotechnical Commission) form the specialized system

38、 for worldwide standardization. National bodies that are members of ISO or IEC participate in the development of International Standards through technical committees established by the respective organization to deal with particular fields of technical activity. ISO and IEC technical committees coll

39、aborate in fields of mutual interest. Other international organizations, governmental and non-governmental, in liaison with ISO and IEC, also take part in the work. In the field of information technology, ISO and IEC have established a joint technical committee, ISO/IEC JTC 1. International Standard

40、s are drafted in accordance with the rules given in the ISO/IEC Directives, Part 2. The main task of the joint technical committee is to prepare International Standards. Draft International Standards adopted by the joint technical committee are circulated to national bodies for voting. Publication a

41、s an Interna- tional Standard requires approval by at least 75 % of the national bodies casting a vote. In exceptional circumstances, when the joint technical committee has collected data of a different kind from that which is normally published as an International Standard (“state of the art”, for

42、example), it may decide to publish a Technical Report. A Technical Report is entirely informative in nature and shall be subject to review every five years in the same manner as an International Standard. Attention is drawn to the possibility that some of the elements of this document may be the sub

43、ject of patent rights. ISO and IEC shall not be held responsible for identifying any or all such patent rights. ISO/IEC TR 19075-4 was prepared by Joint Technical Committee ISO/IEC JTC 1, Information technology, Subcommittee SC 32, Data management and interchange. ISO/IEC TR 19075 consists of the fo

44、llowing parts, under the general title Information technology Database languages SQL Technical Reports: Part 1: XQuery Regular Expression Support in SQL Part 2: SQL Support for Time-Related Information Part 3: SQL Embedded in Programs Using the Java Programming Language Part 4: SQL with Routines and

45、 Types Using the Java Programming Language Part 5: Row Pattern Recognition in SQL NOTE 1 The individual parts of multi-part technical reports are not necessarily published together. New editions of one or more parts may be published without publication of new editions of other parts. ISO/IEC 2014 Al

46、l rights reserved Foreword v DTR 19075-4:2014(E) PD ISO/IEC TR 19075-4:2015 ISO/IEC TR 19075-4:2015(E) Introduction The organization of this part of ISO/IEC 19075 is as follows: 1) Clause 1, “Scope”, specifies the scope of this part of ISO/IEC 19075. 2) Clause 2, “Normative references”, identifies a

47、dditional standards that, through reference in this part of ISO/IEC 19075, constitute provisions of this part of ISO/IEC 19075. 3) Clause 3, “Routines tutorial”, provides a tutorial on the use of routines written in the Java programming language within SQL expressions and statements. 4) Clause 4, “T

48、ypes tutorial”, provides a tutorial on the use of user-defined types written in the Java program- ming language within SQL expressions and statements. vi SQL with Routines and Types Using the Java Programming Language ISO/IEC 2014 All rights reserved DTR 19075-4:2014(E) PD ISO/IEC TR 19075-4:2015 IS

49、O/IEC TR 19075-4:2015(E) TECHNICAL REPORT ISO/IEC DTR 19075-4:2014 Information technology Database languages SQL Technical Reports Part 4: SQL with Routines and Types Using the Java Programming Language 1 Scope This Technical Report provides a tutorial of SQL Routines and Types Using the Java Programming Language. The Report discusses the following features of the SQL Language: The use of routines written in the Java programming language within SQL expressions and statements. the

展开阅读全文
相关资源
  • BS ISO IEC 29150-2011 Information technology Security techniques Signcryption《信息技术 安全技术 签密》.pdfBS ISO IEC 29150-2011 Information technology Security techniques Signcryption《信息技术 安全技术 签密》.pdf
  • BS ISO IEC 15408-1-2009 Information technology - Security techniques - Evaluation criteria for IT Security - Introduction and general model《信息技术 安全技术 IT安全评价准则 一.pdfBS ISO IEC 15408-1-2009 Information technology - Security techniques - Evaluation criteria for IT Security - Introduction and general model《信息技术 安全技术 IT安全评价准则 一.pdf
  • BS ISO 7295-1988+A1-2014 Tyre valves for aircraft Interchangeability dimensions《飞机轮胎汽门嘴 互换性尺寸》.pdfBS ISO 7295-1988+A1-2014 Tyre valves for aircraft Interchangeability dimensions《飞机轮胎汽门嘴 互换性尺寸》.pdf
  • BS ISO 15118-1-2013 Road vehicles Vehicle to grid communication interface General information and use-case definition《道路车辆 车辆到电力通讯接口 通用信息和使用案例定义》.pdfBS ISO 15118-1-2013 Road vehicles Vehicle to grid communication interface General information and use-case definition《道路车辆 车辆到电力通讯接口 通用信息和使用案例定义》.pdf
  • BS ISO 13765-2-2004 Refractory mortars - Determination of consistency using the reciprocating flow table method《耐熔灰浆 使用往复流动表法测定一致性》.pdfBS ISO 13765-2-2004 Refractory mortars - Determination of consistency using the reciprocating flow table method《耐熔灰浆 使用往复流动表法测定一致性》.pdf
  • BS ISO 10998-2008+A1-2014 Agricultural tractors Requirements for steering《农业拖拉机 操纵要求》.pdfBS ISO 10998-2008+A1-2014 Agricultural tractors Requirements for steering《农业拖拉机 操纵要求》.pdf
  • BS Z 9-1998 Space data and information transfer systems - Advanced orbiting systems - Networks and data links - Architectural specification《空间数据和信息传输系统 高级轨道系统 网络和数据链接 结构规范》.pdfBS Z 9-1998 Space data and information transfer systems - Advanced orbiting systems - Networks and data links - Architectural specification《空间数据和信息传输系统 高级轨道系统 网络和数据链接 结构规范》.pdf
  • BS Z 7-1998 Space data and information transfer systems - ASCII encoded English《空间数据和信息传输系统 ASCII 编码英语》.pdfBS Z 7-1998 Space data and information transfer systems - ASCII encoded English《空间数据和信息传输系统 ASCII 编码英语》.pdf
  • BS Z 5-1997 Space data and information transfer systems - Standard formatted data units - Control authority procedures《航天数据和信息发送系统 标准格式数据单元 控制授权程序》.pdfBS Z 5-1997 Space data and information transfer systems - Standard formatted data units - Control authority procedures《航天数据和信息发送系统 标准格式数据单元 控制授权程序》.pdf
  • BS Z 4-1997 Space data and information transfer systems - Standard formatted data units - Structure and construction rules《航天数据和信息传输系统 标准格式数据单元 结构和构造规则》.pdfBS Z 4-1997 Space data and information transfer systems - Standard formatted data units - Structure and construction rules《航天数据和信息传输系统 标准格式数据单元 结构和构造规则》.pdf
  • 猜你喜欢
    相关搜索

    当前位置:首页 > 标准规范 > 国际标准 > BS

    copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
    备案/许可证编号:苏ICP备17064731号-1