Programmer's Guide to the Oracle Precompilers

Total Page:16

File Type:pdf, Size:1020Kb

Programmer's Guide to the Oracle Precompilers Oracle® Database Programmer's Guide to the Oracle Precompilers 12c Release 2 (12.2) E85800-01 January 2017 Oracle Database Programmer's Guide to the Oracle Precompilers, 12c Release 2 (12.2) E85800-01 Copyright © 2008, 2017, Oracle and/or its affiliates. All rights reserved. Primary Author: Siddharth Naidu Contributors: Denis Raphaely, Simon Watt, Radhakrishnan Hari, Nancy Ikeda, Ken Jacobs, Valarie Moore, Tim Smith, Scott Urman, Arun Desai, Mallikharjun Vemana, Subhranshu Banerjee This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency- specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs. No other rights are granted to the U.S. Government. This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners. Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group. This software or hardware and documentation may provide access to or information about content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services unless otherwise set forth in an applicable agreement between you and Oracle. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services, except as set forth in an applicable agreement between you and Oracle. Contents Preface Intended Audience xxiii Structure xxiii Documentation Accessibility xxv Related Documents xxvi Conventions xxvi 1 Getting Acquainted 1.1 What Is an Oracle Precompiler? 1-1 1.1.1 Language Alternatives 1-2 1.2 Why Use an Oracle Precompiler? 1-3 1.3 Why Use SQL? 1-3 1.4 Why Use PL/SQL? 1-4 1.5 What Do the Oracle Precompilers Offer? 1-4 1.6 Do the Oracle Precompilers Meet Industry Standards? 1-5 1.6.1 Requirements 1-6 1.6.2 Compliance 1-6 1.6.3 FIPS Flagger 1-6 1.6.4 FIPS Option 1-7 1.6.5 Certification 1-7 2 Learning the Basics 2.1 Key Concepts of Embedded SQL Programming 2-1 2.1.1 Embedded SQL Statements 2-1 2.1.2 Executable versus Declarative Statements 2-2 2.1.3 Embedded SQL Syntax 2-3 2.1.4 Static versus Dynamic SQL Statements 2-4 2.1.5 Embedded PL/SQL Blocks 2-4 2.1.6 Host and Indicator Variables 2-4 2.1.7 Oracle Datatypes 2-5 2.1.8 Arrays 2-5 iii 2.1.9 Datatype Equivalencing 2-5 2.1.10 Private SQL Areas, Cursors, and Active Sets 2-5 2.1.11 Transactions 2-6 2.1.12 Errors and Warnings 2-6 2.2 Steps in Developing an Embedded SQL Application 2-7 2.3 A Sample Program 2-9 2.4 Sample Tables 2-10 2.4.1 Sample Data 2-10 3 Meeting Program Requirements 3.1 The Declare Section 3-1 3.1.1 An Example 3-2 3.2 INCLUDE Statements 3-2 3.3 The SQLCA 3-3 3.4 Oracle Datatypes 3-3 3.4.1 Internal Datatypes 3-4 3.4.2 CHAR 3-4 3.4.3 DATE 3-5 3.4.4 LONG 3-5 3.4.5 LONG RAW 3-5 3.4.6 MLSLABEL 3-5 3.4.7 NUMBER 3-6 3.4.8 RAW 3-6 3.4.9 ROWID 3-6 3.4.10 VARCHAR2 3-6 3.4.11 SQL Pseudocolumns and Functions 3-7 3.4.12 ROWLABEL Column 3-8 3.4.13 External Datatypes 3-8 3.4.14 CHAR 3-9 3.4.15 CHARF 3-10 3.4.16 CHARZ 3-10 3.4.17 DATE 3-10 3.4.18 DECIMAL 3-11 3.4.19 DISPLAY 3-11 3.4.20 FLOAT 3-11 3.4.21 INTEGER 3-11 3.4.22 LONG 3-11 3.4.23 LONG RAW 3-11 3.4.24 LONG VARCHAR 3-12 3.4.25 LONG VARRAW 3-12 iv 3.4.26 MLSLABEL 3-12 3.4.27 NUMBER 3-12 3.4.28 RAW 3-13 3.4.29 ROWID 3-13 3.4.30 STRING 3-13 3.4.31 UNSIGNED 3-14 3.4.32 VARCHAR 3-14 3.4.33 VARCHAR2 3-14 3.4.34 VARNUM 3-15 3.4.35 VARRAW 3-15 3.5 Datatype Conversion 3-15 3.5.1 DATE Values 3-17 3.5.2 RAW and LONG RAW Values 3-17 3.6 Declaring and Referencing Host Variables 3-17 3.6.1 Some Examples 3-18 3.6.2 VARCHAR Variables 3-18 3.6.3 Host Variable Guidelines 3-19 3.7 Declaring and Referencing Indicator Variables 3-19 3.7.1 INDICATOR Keyword 3-19 3.7.2 An Example 3-19 3.7.3 Indicator Variable Guidelines 3-20 3.8 Datatype Equivalencing 3-20 3.8.1 Why Equivalence Datatypes? 3-20 3.8.2 Host Variable Equivalencing 3-21 3.8.3 An Example 3-22 3.8.4 About Using the CHARF Datatype Specifier 3-23 3.8.5 Guidelines 3-23 3.9 Globalization Support 3-24 3.10 Multibyte Globalization Support Character Sets 3-26 3.10.1 Character Strings in Embedded SQL 3-26 3.10.2 Dynamic SQL 3-26 3.10.3 Embedded DDL 3-26 3.10.4 Multibyteultibyte Globalization Support Host Variables 3-26 3.10.5 Restrictions 3-27 3.10.6 Blank Padding 3-27 3.10.7 Indicator Variables 3-27 3.11 Concurrent Logons 3-27 3.11.1 Some Preliminaries 3-28 3.11.2 Default Databases and Connections 3-28 3.11.3 Explicit Logons 3-29 3.11.4 Single Explicit Logons 3-29 v 3.11.5 Multiple Explicit Logons 3-32 3.11.6 Implicit Logons 3-33 3.11.7 Single Implicit Logons 3-33 3.11.8 Multiple Implicit Logons 3-34 3.12 Embedding OCI (Oracle Call Interface) Calls 3-34 3.12.1 About Setting Up the LDA 3-35 3.12.2 Remote and Multiple Connections 3-35 3.13 About Developing X/Open Applications 3-35 3.13.1 Oracle-Specific Issues 3-36 3.13.2 About Connecting to Oracle 3-37 3.13.3 Transaction Control 3-37 3.13.4 OCI Calls 3-37 3.13.5 Linking 3-37 4 Using Embedded SQL 4.1 About Using Host Variables 4-1 4.1.1 Output versus Input Host Variables 4-1 4.2 About Using Indicator Variables 4-2 4.2.1 Input Variables 4-2 4.2.2 Output Variables 4-2 4.2.3 Inserting Nulls 4-3 4.2.4 Handling Returned Nulls 4-3 4.2.5 Fetching Nulls 4-3 4.2.6 Testing for Nulls 4-4 4.2.7 Fetching Truncated Values 4-4 4.3 The Basic SQL Statements 4-4 4.3.1 Selecting Rows 4-5 4.3.2 Available Clauses 4-6 4.3.3 Inserting Rows 4-6 4.3.4 Using Subqueries 4-6 4.3.5 Updating Rows 4-6 4.3.6 Deleting Rows 4-7 4.3.7 Using the WHERE Clause 4-7 4.4 Cursors 4-7 4.4.1 Declaring a Cursor 4-8 4.4.2 Opening a Cursor 4-8 4.4.3 Fetching from a Cursor 4-9 4.4.4 Closing a Cursor 4-10 4.4.5 Using the CURRENT OF Clause 4-10 4.4.6 Restrictions 4-10 vi 4.4.7 A Typical Sequence of Statements 4-11 4.4.8 A Complete Example 4-11 4.5 Cursor Variables 4-12 4.5.1 About Declaring a Cursor Variable 4-13 4.5.2 Allocating a Cursor Variable 4-13 4.5.3 Opening a Cursor Variable 4-13 4.5.4 Fetching from a Cursor Variable 4-14 4.5.5 Closing a Cursor Variable 4-15 5 Using Embedded PL/SQL 5.1 Advantages of PL/SQL 5-1 5.1.1 Better Performance 5-1 5.1.2 Integration with Oracle 5-1 5.1.3 Cursor FOR Loops 5-2 5.1.4 Subprograms 5-2 5.1.5 Parameter Modes 5-3 5.1.6 Packages 5-3 5.1.7 PL/SQL Tables 5-3 5.1.8 User-defined Records 5-4 5.2 About Embedding PL/SQL Blocks 5-5 5.3 About Using Host Variables 5-5 5.3.1 An Example 5-5 5.3.2 A More Complex Example 5-6 5.3.3 VARCHAR Pseudotype 5-8 5.4 About Using Indicator Variables 5-8 5.4.1 Handling Nulls 5-9 5.4.2 Handling Truncated Values 5-9 5.5 About Using Host Arrays 5-10 5.5.1 ARRAYLEN Statement 5-11 5.6 About Using Cursors 5-12 5.6.1 An Alternative 5-13 5.7 Stored Subprograms 5-13 5.7.1 Creating Stored Subprograms 5-14 5.7.2 Calling a Stored Subprogram 5-15 5.7.3 Remote Access 5-17 5.7.4 Getting Information about Stored Subprograms 5-17 5.8 About Using Dynamic PL/SQL 5-18 5.8.1 Restriction 5-18 vii 6 Running the Oracle Precompilers 6.1 The Precompiler Command 6-1 6.2 What Occurs during Precompilation? 6-2 6.3 Precompiler Options 6-2 6.3.1 Default Values 6-3 6.3.2 Determining Current Values 6-4 6.3.3 Case Sensitivity 6-4 6.3.4 Configuration Files 6-4 6.4 Entering Options 6-5 6.4.1
Recommended publications
  • Database Application Development Overview SQL in Application Code SQL in Application Code (Contd.) Embedded SQL Embedded SQL: Va
    Overview Concepts covered in this lecture: Database Application Development SQL in application code Embedded SQL Cursors Chapter 6 Dynamic SQL JDBC SQLJ Stored procedures Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 2 SQL in Application Code SQL in Application Code (Contd.) SQL commands can be called from within a host language (e.g., C++ or Java) program. Impedance mismatch: SQL statements can refer to host variables SQL relations are (multi-) sets of records, with (including special variables used to return status). no a priori bound on the number of records. Must include a statement to connect to the right No such data structure exist traditionally in database. procedural programming languages such as Two main integration approaches: C++. (Though now: STL) Embed SQL in the host language (Embedded SQL, SQL supports a mechanism called a cursor to SQLJ) handle this. Create special API to call SQL commands (JDBC) Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 3 Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 4 Embedded SQL Embedded SQL: Variables Approach: Embed SQL in the host language. A preprocessor converts the SQL statements into special API calls. EXEC SQL BEGIN DECLARE SECTION Then a regular compiler is used to compile the char c_sname[20]; code. long c_sid; short c_rating; float c_age; Language constructs: EXEC SQL END DECLARE SECTION Connecting to a database: EXEC SQL CONNECT Declaring variables: Two special “error” variables: EXEC SQL BEGIN (END) DECLARE SECTION SQLCODE (long, is negative if an error has occurred) Statements: SQLSTATE (char[6], predefined codes for common errors) EXEC SQL Statement; Database Management Systems 3ed, R.
    [Show full text]
  • Openvms Guide
    Mimer SQL OpenVMS Guide Version 11.0 Mimer SQL, OpenVMS Guide, Version 11.0, January 2018 © Copyright Mimer Information Technology AB. The contents of this manual may be printed in limited quantities for use at a Mimer SQL installation site. No parts of the manual may be reproduced for sale to a third party. Information in this document is subject to change without notice. All registered names, product names and trademarks of other companies mentioned in this documentation are used for identification purposes only and are acknowledged as the property of the respective company. Companies, names and data used in examples herein are fictitious unless otherwise noted. Produced and published by Mimer Information Technology AB, Uppsala, Sweden. Mimer SQL Web Sites: https://developer.mimer.com https://www.mimer.com Contents i Contents .............................................................................................................................. i Chapter 1 Introduction .......................................................................................1 About Mimer SQL for OpenVMS...................................................................................1 The Mimer SQL Database Server .................................................................................. 1 Embedded SQL................................................................................................................. 1 Module SQL......................................................................................................................
    [Show full text]
  • Embedded SQL N Functions and Procedural Constructs N Triggers
    CS425 – Summer 2016 Jason Arnold Chapter 6: Advanced SQL modified from: Database System Concepts, 6th Ed. ©Silberschatz, Korth and Sudarshan See www.db-book.com for conditions on re-use Chapter 6: Advanced SQL n Accessing SQL From a Programming Language l Dynamic SQL JDBC and ODBC l Embedded SQL n Functions and Procedural Constructs n Triggers Textbook: Chapter 5 CS425 – Fall 2013 – Boris Glavic 5.2 ©Silberschatz, Korth and Sudarshan Accessing SQL From a Programming Language CS425 – Fall 2013 – Boris Glavic 5.3 ©Silberschatz, Korth and Sudarshan JDBC and ODBC n API (application-program interface) for a program to interact with a database server n Application makes calls to l Connect with the database server l Send SQL commands to the database server l Fetch tuples of result one-by-one into program variables n ODBC (Open Database Connectivity) works with C, C++, C#, and Visual Basic l Other API’s such as ADO.NET sit on top of ODBC n JDBC (Java Database Connectivity) works with Java CS425 – Fall 2013 – Boris Glavic 5.4 ©Silberschatz, Korth and Sudarshan Native APIs n Most DBMS also define DBMS specific APIs n Oracle: OCI n Postgres: libpg … CS425 – Fall 2013 – Boris Glavic 5.5 ©Silberschatz, Korth and Sudarshan JDBC n JDBC is a Java API for communicating with database systems supporting SQL. n JDBC supports a variety of features for querying and updating data, and for retrieving query results. n JDBC also supports metadata retrieval, such as querying about relations present in the database and the names and types of relation attributes.
    [Show full text]
  • Developing Embedded SQL Applications
    IBM DB2 10.1 for Linux, UNIX, and Windows Developing Embedded SQL Applications SC27-3874-00 IBM DB2 10.1 for Linux, UNIX, and Windows Developing Embedded SQL Applications SC27-3874-00 Note Before using this information and the product it supports, read the general information under Appendix B, “Notices,” on page 209. Edition Notice This document contains proprietary information of IBM. It is provided under a license agreement and is protected by copyright law. The information contained in this publication does not include any product warranties, and any statements provided in this manual should not be interpreted as such. You can order IBM publications online or through your local IBM representative. v To order publications online, go to the IBM Publications Center at http://www.ibm.com/shop/publications/ order v To find your local IBM representative, go to the IBM Directory of Worldwide Contacts at http://www.ibm.com/ planetwide/ To order DB2 publications from DB2 Marketing and Sales in the United States or Canada, call 1-800-IBM-4YOU (426-4968). When you send information to IBM, you grant IBM a nonexclusive right to use or distribute the information in any way it believes appropriate without incurring any obligation to you. © Copyright IBM Corporation 1993, 2012. US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents Chapter 1. Introduction to embedded Include files for COBOL embedded SQL SQL................1 applications .............29 Embedding SQL statements
    [Show full text]
  • SQL in Application Programs JDBC: Java Database Connectivity
    SQL in Application Programs JDBC: Java Database Connectivity CLI: Call-Level Interface Embedded SQL We have seen how SQL is used at the generic query interface --- an environment where we sit at a terminal and ask queries of a database. Reality is almost always different: conventional programs interacting with SQL. Want to consider: How do we enable a database to interact with an “ordinary” program written in a language such as C or Java? How do we deal with the differences in data types supported by SQL and conventional languages? In particular, relations, which are the result of queries, are not directly supported by conventional languages. A common environment for using a database has three tiers of processors: 1. Web servers --- Connect users to the database, usually over the Internet, or possibly a local connection. 2. Application servers --- Execute the “business logic” – whatever it is the system is supposed to do. 3. Database servers --- Run the DBMS and execute queries and modifications at the request of the application servers. Database holds the information about products, customers, etc. Business logic includes things like “what do I do after someone clicks ‘checkout’?” Answer: Show the “How will you pay for this?” screen. For this section, we will deal with the interaction between the application and the DBMS A SQP environment is the framework under which data exists and SQL operations are executed. Think of a SQL environment as a DBMS running at some installation. So tables, triggers, views, etc are defined within a SQL environment Database servers maintain some number of connections, so app servers can ask queries or perform modifications.
    [Show full text]
  • Embedded SQL Guide for RM/Cobol
    Firebird Embedded SQL Guide for RM/Cobol Embedded SQL Guide for RM/Cobol 3 Table of Contents 1. Program Structure...............................................................................................................................6 1.1. General...........................................................................................................................................6 1.2. Reading this Guide.........................................................................................................................6 1.3. Definition of Terms........................................................................................................................6 1.4. Declaring Host Variables...............................................................................................................7 1.5. Declaring and Accessing Databases...............................................................................................7 1.6. Transactions....................................................................................................................................7 1.7. SQL Statements..............................................................................................................................8 1.8. Statement Handles..........................................................................................................................8 1.9. Dynamic SQL (DSQL)...................................................................................................................8 1.10. Error
    [Show full text]
  • Free Pascal Sql Select with Like Clause
    Free Pascal Sql Select With Like Clause Spiritualistic Claude usually overtoils some urolith or crews devotionally. Bartholemy obliterate sinisterly while unrestored Charley fubbed languorously or expertizes flatteringly. Unreproaching and thermogenetic Ignatius still denounced his hoaxer ravingly. Many machines as such features including zmbufdataset unit, to assign the line options manipulation capabilities of the address to perform different component with pascal, binary collating sequence is very reason Test runner that allows DUnit Tests to output NUnit compatible XML. Connection to the DB could smuggle the grade is those Tables and Fields actually there, supporting joint development efforts, profile parameters of the SAP system etc. Bug cannot remove hook up to ensure that the firebird allows you use the database location of leonardos upcoming posts and free pascal sql select with like clause too big table to follow this may know about! If you include a Column now, so the comma comes after the eight column name, fit better still use one house the Free Pascal mirror sites. You can freeze anything that want shut it. In the TextBox control type echo following SQL statement. ZONE which also stores the time zone. The same order by the column definitions, like sql with free pascal select clause. The databases reverential integrity will make tough very difficult. Delphi ide plugin for this blog and database file, which extend this with free pascal sql select with like clause to be. How to define future new exception type. The leave that visitors are registered is such order anymore the SQL is called and hunger find not the most reliable is compulsory register them in each order of launch, window, at least.
    [Show full text]
  • Database Programming Week 9
    Database Programming Week 9 *Some of the slides in this lecture are created by Prof. Ian Horrocks from University of Oxford SQL in Real Programs • We have seen only how SQL is used at the generic query interface --- an environment where we sit at a terminal and ask queries of a database. • Reality is almost always different. – Programs in a conventional language like C are written to access a database by “calls” to SQL statements. 2 Database Programming Code in Programming Language SQL Sequence of tuples Database 3 SQL in Application Code • SQL commands can be called from within a host language (e.g., C++ or Java) program. – SQL statements can refer to host variables (including special variables used to return status). – Must include a statement to connect to the right database. • Two main integration approaches: – Embed SQL in the host language (embedded SQL, SQLJ) – Create special API to call SQL commands (JDBC) 4 SQL in Application Code (Con’t) • Impedance mismatch – SQL relations are (multi-) sets of records, with no a priori bound on the number of records. Typically, no such data structure in programming languages such as C/ C++ (Though now: STL). – SQL supports a mechanism called a cursor to handle this. 5 Embedded SQL • Approach: Embed SQL in the host language. – A preprocessor converts/translates the SQL statements into special API calls. – Then a regular compiler is used to compile the code. 6 Embedded SQL • Language constructs: – Connecting to a database !EXEC SQL CONNECT :usr_pwd;! !// the host variable usr_pwd contains your
    [Show full text]
  • Openvms Guide
    Mimer SQL OpenVMS Guide Version 10.1 Mimer SQL, OpenVMS Guide, Version 10.1, December 2017 © Copyright Mimer Information Technology AB. The contents of this manual may be printed in limited quantities for use at a Mimer SQL installation site. No parts of the manual may be reproduced for sale to a third party. Information in this document is subject to change without notice. All registered names, product names and trademarks of other companies mentioned in this documentation are used for identification purposes only and are acknowledged as the property of the respective company. Companies, names and data used in examples herein are fictitious unless otherwise noted. Produced and published by Mimer Information Technology AB, Uppsala, Sweden. P.O. Box 1713, SE-751 47 Uppsala, Sweden. Tel +46(0)18-780 92 00. Fax +46(0)18-780 92 40. Mimer SQL Web Sites: http://developer.mimer.com http://www.mimer.com Contents i Contents .............................................................................................................................. i Chapter 1 Introduction ....................................................................................... 1 About Mimer SQL for OpenVMS...................................................................................1 The Mimer SQL Database Server .................................................................................. 1 Embedded SQL................................................................................................................. 1 JDBC Driver......................................................................................................................
    [Show full text]
  • Oracle Rdb™ SQL Reference Manual Volume 2
    Oracle Rdb™ SQL Reference Manual Volume 2 Release 7.2 for HP OpenVMS Industry Standard 64 for Integrity Servers and OpenVMS Alpha operating systems October 2006 ® DEC_Callout (encoded characters) FullName: DEC Modular Callouts Distiller, PostScript v3011.104 r0 Notice: Copyright 1988 - 1993, Digital Equipment Corporation. Font version: 1.3, 13-Oct-1993 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 40 1.000 41 1.000 42 1.000 43 1.000 44 1.000 45 1.000 46 1.000 47 1.000 50 1.000 51 1.000 52 0.500 53 0.500 54 0.500 55 0.500 56 0.500 57 0.500 cx0 cx1 cx2 cx3 cx4 cx5 cx6 cx7 cx8 cx9 bx0 bx1 bx2 bx3 bx4 bx5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 60 0.500 61 0.500 62 0.500 63 0.500 64 0.375 65 0.375 66 0.375 67 0.375 70 0.375 71 0.375 72 0.375 73 0.375 74 0.375 75 0.375 76 0.500 77 0.500 bx6 bx7 bx8 bx9 mx0 mx1 mx2 mx3 mx4 mx5 mx6 mx7 mx8 mx9 ex0 ex1 2 3 4 5 6 7 8 9 100 0.500 101 0.500 102 0.500 103 0.500 104 0.500 105 0.500 106 0.500 107 0.500 110 0.000 111 0.000 112 0.000 113 0.000 114 0.000 115 0.000 116 0.000 117 0.000 ex2 ex3 ex4 ex5 ex6 ex7 ex8 ex9 120 0.000 121 0.000 122 0.000 123 0.000 124 0.000 125 0.000 126 0.000 127 0.000 130 0.000 131 0.000 132 0.000 133 0.000 134 0.000 135 0.000 136 0.000 137 0.000 140 0.000 141 0.000 142 0.000 143 0.000 144 0.000 145 0.000 146 0.000 147 0.000 150 0.000 151 0.000 152 0.000 153 0.000 154 0.000 155 0.000 156 0.000 157 0.000 160 0.000 161 0.000 162 0.000 163 0.000 164 0.000 165 0.000 166 0.000 167 0.000 170 0.000 171 0.000 172 0.000 173 0.000 174 0.000 175 0.000 176 0.000 177 0.000 0123456789012345678901234567890123456789
    [Show full text]
  • Embedded SQL Call-Level Interface Java Database Connectivity
    Real SQL Programming Embedded SQL Call-Level Interface Java Database Connectivity 1 SQL in Real Programs We have seen only how SQL is used at the generic query interface --- an environment where we sit at a terminal and ask queries of a database. Reality is almost always different. Programs in a conventional language like C are written to access a database by “calls” to SQL statements. 2 Host Languages Any conventional language can be a host language, that is, a language in which SQL calls are embedded. The use of a host/SQL combination allows us to do anything computable, yet still get the very-high-level SQL interface to the database. 3 Connecting SQL to the Host Language 1. Embedded SQL is a standard for combining SQL with seven languages. 2. CLI (Call-Level Interface ) is a different approach to connecting C to an SQL database. 3. JDBC (Java Database Connectivity ) is a way to connect Java with an SQL database. 4 Embedded SQL Key idea: Use a preprocessor to turn SQL statements into procedure calls that fit with the host-language code surrounding. All embedded SQL statements begin with EXEC SQL, so the preprocessor can find them easily. 5 Shared Variables To connect SQL and the host-language program, the two parts must share some variables. Declarations of shared variables are bracketed by: EXEC SQL BEGIN DECLARE SECTION; Always needed <host-language declarations> EXEC SQL END DECLARE SECTION; 6 Use of Shared Variables In SQL, the shared variables must be preceded by a colon. They may be used as constants provided by the host-language program.
    [Show full text]
  • Mimer SQL on Openvms Present and Future
    Mimer SQL on OpenVMS Present and Future Bengt Gunne, CTO 1 Agenda . Background . Mimer customers . Platforms . Technical features . Mimer SQL on OpenVMS . Ongoing development . Q&A 2 Bengt Gunne . Started working with Mimer in 1981 – Have worked with many parts of the system such as: . Database kernel . Transaction handling . Client/server communications . Clients such as ODBC and ADO.NET . Overall design . Multiuser systems for PDP, VMS, HP-UX, Windows etc. Most recently written a new SQL optimizer – Head of development since 1991 – Chief Technical Officer 3 Who was Mimer? Mimer was a giant in the Norse Mythology who guarded the well of wisdom. The gods came to Mimer for advice. When they looked into the well they could see everything that happened in the world. The god Oden even took out one of his eyes and put it in the well to be able to see everything at all times. Today, ordinary people come to Mimer for advice… 4 Mimer Information Technology AB . HQ in Uppsala, Sweden – Office in Stockholm and Beijing – Partners in China, Japan, Korea, Central Europe, and USA . World class experts in relational database technology . Developer of the Mimer SQL product family – Enterprise Solutions – Industrial/Automotive/Embedded Solutions – Mobile Solutions . Mimer SQL used in mission critical systems world wide since the 1970s 5 What is Mimer SQL? . Relational database management system . Standard SQL . Runs on many platforms – Tight integration with OpenVMS 6 Company focus . The company focuses solely on Mimer SQL – Tools are through third party integrations . How is this possible/facilitated? – Standard SQL – Standard programming interfaces Requires a truly open system 7 Mimer SQL background .
    [Show full text]