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

EclipseLink/Development/DBWS/ParseDDLFS

< EclipseLink‎ | Development‎ | DBWS
Revision as of 14:23, 20 July 2011 by Michael.norman.oracle.com (Talk | contribs) (Document History)

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

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 (see Open Issues)
  • IDE integration (JDev, Dali) unchanged

Scope

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

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 strategy. 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.

The DDL returned is complete, no artifacts are missing nor is any type information distorted.

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).

Back to the top