Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "EclipseLink/Development/DBWS/ParseDDLFS"

(Open Issues)
 
Line 78: Line 78:
 
| 2
 
| 2
 
| MWN
 
| MWN
| if a future version of the Oracle database changes the DDL in such a way to <b><i>break</i></b> existing DDL, some sort of 'versioned' parser will be required.
+
| If a schema user references a type from a different schema, then the first schema must have the SELECT_CATALOG_ROLE granted to it.
 
|-  
 
|-  
 
|}
 
|}

Latest revision as of 14:17, 1 November 2011

Parsing DDL for Metadata Functional Spec

Document History

Date Author Version Description & Notes
110601 Mike Norman 1.0 - use DBWS_METADATA to get information on database artifacts
110720 Mike Norman 1.1 - clarify scope: only intended to work with Oracle databases

DBMS_METADATA requires 'filter's to make the DDL presentable to the parser.
In order to 'future-proof' ourselves from possible changes to DBMS_METADATA's
implementation, ensure that the filters can be overridden by the end-user

Overview

The primary job of the DBWSBuilder utility is to extract metadata from the database about some artifact (i.e. a Table or a StoredProcedure) that is to be used as the basis of a Web Service. The DBWSBuilder translates the retrieved information (field names, arguments, scalar or composite datatypes, etc.) into DBWS runtime artifacts (EclipseLink Project XML files, WSDL and XML schema, etc.) Thus it is crucial that DBWSBuilder get complete and accurate information from the database.

Requirements

Scope

This feature is intended only for parsing Oracle DDL - it is not a general SQL/DDL parser for other databases.

Public API

The goal of this feature is to make no changes to public API

  • existing dbws builder files will still work; no new elements/attributes added
  • IDE integration (JDev, Dali) unchanged

Use Cases

The goal of this feature is to support all existing use cases as well as provide capabilities to support the following new cases:

Reusable Standalone library

Other projects have expressed an interest in this solution. The DDL Parser will be implemented as standalone, not requiring any classes from either eclipselink.jar or eclipselink-dbwsutils.jar

Extracting DDL

There is a utility method available in the Oracle database DBMS_METADATA.GET_DDL(specType, typeName, schema) that has been available since 9i that successfully returns DDL for a wide-variety of artifacts:

  • package specification
  • table specification
  • object types: structs, varrays, nested tables
  • top-level procedures and functions.

This means that the existing JPub code in o.e.p.platform.database.oracle.publisher is removed

Refactoring Strategy

Switching from JPub to parsing DDL is admittedly riskly as it is a 'break-the-world' change: work must be done to implement existing functionality. However, the above use cases cannot be supported with the existing code-base. In addition, the elimination of JPub legacy code lead to no other choice going forward.

Open Issues

This section lists the pending open issues.

Issue # Owner Description / Notes
1 MWN DBMS_METADATA cannot provide DDL for packages that have been 'wrapped', a type of encryption that obfuscates the DDL. Some alternative way to provide the DDL would need to be required (such as a location outside the DB i.e. file system or remote URL).
2 MWN If a schema user references a type from a different schema, then the first schema must have the SELECT_CATALOG_ROLE granted to it.

Back to the top