SwisSQL Background

Project Title: OGSA-DAI Document Title: SwisSQL Background Document Identifier: RFC 16 Distribution Classification: DRAFT: OGSA-DAI Internal Authorship: Craig Thomson

Approval List: N/A

Distribution List: OGSA-DAI Team

Document History: Personnel Date

Summary

Version

Copyright © The University of Edinburgh, 2006. All rights reserved.

.1 1.2 1. All rights reserved.3 2 3 4 5 6 7 8 Introduction Document Status Notation and Conventions Namespace What is SwisSQL? How can we use the SQLOne API? Which relational resources does it support? Which SQL syntax does it not support? Licensing Summary References 3 3 3 3 4 4 5 5 5 5 6 Copyright © The University of Edinburgh. 2006.SwisSQL Background DRAFT: OGSA-DAI Internal 2 Contents 1 1.

1.3 Namespace I don’t know what namespace this should go in. “MUST NOT”. Release 3 Denotes a restriction in functionality expected for release 3 of OGSA-DAI. Copyright © The University of Edinburgh. All rights reserved. surrounded by frames. “SHOULD”.SwisSQL Background DRAFT: OGSA-DAI Internal 3 1 Introduction 1. “SHALL”. those that are optional appear as a normal font. “SHOULD NOT”.2 Notation and Conventions The key words “MUST”. and “OPTIONAL” in this document are to be interpreted as described in RFC 2119 [1]. “MAY”. “SHALL NOT”. 2006. Restrictions in functionality in accordance with the OGSA-DAI release schedule will be denoted by the usage of the boxes. “REQUIRED”. . This document will subsequently be absorbed into the High Level System Design document.1 Document Status This short document aims to provide the current High Level System Design view on an OGSA-DAI SwisSQL activity. In the XML examples. Release 2 Denotes a restriction in functionality expected for release 2 of OGSA-DAI. elements and attributes that MUST be present are in bold font. 1. The purpose of this document is to elicit comment from interested parties within OGSA-DAI and for the detailed design to take place leading towards release 2 and beyond of the OGSA-DAI software. “RECOMMENDED”.

To provide an accurate conversion. created to allow communication and migration between different flavours of SQL database. and one for C# using . The particular part of SwisSQL of interest to OGSA-DAI. it is sometimes required to access the input database’s metadata. It would take an SQL query as input and use the SQLOne API to convert the SQL to the appropriate format for the database. .SwisSQL Background DRAFT: OGSA-DAI Internal 4 2 What is SwisSQL? SwisSQL(http://www. one for Java.NET. All rights reserved.com/products/sqlone-apijava/sqlone-apijava. SQLOne API.com) is a range of products. is an API which allows the translation of SQL queries to and from different SQL syntaxes. These all fall under the common name “SwisSQL”.com) an American company.swissql. This would require a change to the SQLQuery to allow it to accept a query as one of it’s inputs. Both versions support the same database types. Advantages • The client code doesn’t even need to be aware that a conversion is happening. The SQLOne API comes in two versions. 2006. It is developed by AdventNet(http://www. the conversion remains within the OGSA-DAI framework • The activity abstracts the conversion API so we can change it Disadvantages • Client code has to call a conversion activity • Have to write a conversion activity • Have to change the SQLQuery to allow it to accept queries as input JDBC Wrapper To use the JDBC wrapper. connect to the underlying SQL database and then execute the query as you would with any JDBC driver. It provides access to their SQL conversion engine. • Less code needs written Disadvantages • No control of when a conversion happens • Means changing the meaning of the existing SQLQuery • No access to the converted query • Caching of SQL queries has a memory overhead Copyright © The University of Edinburgh.html 3 How can we use the SQLOne API? The SQLOne API allows two main ways of accessing it’s functionality. all that is required is to register the JDBC wrapper.adventnet. The second is a JDBC Wrapper which sits between the code and the database automatically converting SQL queries to the correct format before passing them on to the database specific JDBC driver. It is called the SwisSQL. Advantages: • Explicit control of when SQL is converted • Allows the output of the conversion to be available on the client side • With an activity. There are other services provided by AdventNet which allow data migration between different SQL databases and a GUI application for translating SQL queries between different database syntaxes.swissql. The first is an API available for direct use in our source. The Java SQLOne API page is at this time available at: http://www. The wrapper caches the SQL queries it receives to prevent repeated parsing of the same query. Direct API access In order to use this method a new Activity would be required. This can be retrieved using the SQLOne API. The converted SQL would then be output and used for the input of an SQLQuery.

x • MySQL 4. supports • Oracle 8.1. In both modes. I am not sure whether it supports the same version as OGSA-DAI however.X • PostgreSQL 7.7. If we were to support an activity to translate between two vendor specific databases we would need to provide this metadata. All rights reserved. The direct API allows explicit control of conversions. The evaluation is free. This allows implicit information in the query to be correctly converted for use in the target database.NET) API directly accessible from code. .2 SwisSQL limitations Another OGSA_DAI document by Alexander Woehrer[2] indicated that the semantics of translated SQL was not necessarily correct. It is distributed in binary form. It is available for download from their website. It may be that users of the activity find problems with the translation that are not the fault of the activity we write but are due to inconsistencies in the underlying translation code.x • Sybase ASE 12. 5 Which SQL syntax does it not support? The SQLOne API has a list of supported and unsupported SQL syntax in it’s help documentation. It also provides conversion through a JDBC wrapper.x • ANSI-SQL . and 10g • MS SQL Server 2000 • IBM DB2 UDB 8. 6.x • Informix 4. 6 Other Issues 6. it supports all the relational databases that OGSA-DAI does.SwisSQL Background DRAFT: OGSA-DAI Internal 5 4 Which relational resources does it support? The SQLOne API. 7 Licensing Evaluation Licence The SQLOne API is available for a 30 day evaluation period. Full Licence Terms are unknown at this point 8 Summary The SwisSQL range provides a number of tools for migrating SQL databases and querying SQL databases in a generic form. Copyright © The University of Edinburgh. The SQLOne API provides a way of converting SQL queries between different dialects of SQL. It does this via a Java (or .1 Metadata The API allows the use of metadata from a source database when converting an SQL query from one dialect to another. and the JDBC wrapper allows the conversions to occur without the user having to use the API. 2006. 9i.SQL 92 and SQL 99 In particular it supports all of the relational database formats that OGSA-DAI does.

.SwisSQL Background DRAFT: OGSA-DAI Internal 6 9 References [1] [2] RFC 2199. http://www.doc Copyright © The University of Edinburgh. 2006.doc. http://localhost:8000/twiki/pub/DAIT/WebHome/OGSA-DAI-SQL99Support. All rights reserved.txt. OGSA-DAI-SQL99Support.org/rfc/rfc2119.ietf.

Sign up to vote on this title
UsefulNot useful