Home      iStore       Order Management       Service Contracts      About Us      SiteMap     

Monday, July 15, 2013

Oracle 12c Top Features


   This article is mainly focused for developers 
  • Row Limiting Clause for Top-N Queries
    • Top-N queries provide a method for limiting the number of rows returned from ordered sets of data. They are extremely useful when you want to return the top or bottom "N" number of rows from a set or when you are paging through data
SELECT *
FROM   table_name
ORDER BY column_name
LIMIT 0 , 50
[ OFFSET offset { ROW | ROWS } ]
[ FETCH { FIRST | NEXT } [ { rowcount | percent PERCENT } ]
{ ROW | ROWS } { ONLY | WITH TIES } ]

SELECT column1
FROM   table_name
ORDER BY column1 DESC
FETCH FIRST 20 ROWS ONLY

  • WITH Clause Enhancements
    • We can declare PL/SQL functions and procedures in the WITH Clause of a select statement
WITH
  PROCEDURE with_procedure(p_id IN NUMBER) IS
  BEGIN
    DBMS_OUTPUT.put_line('p_id=' || p_id);
  END;

  FUNCTION with_function(p_id IN NUMBER) RETURN NUMBER IS
  BEGIN
    with_procedure(p_id);
    RETURN p_id;
  END;
SELECT with_function(id)
FROM   table_name
WHERE  rownum = 1
  • Duplicate Indexes
    • Can have both B-tree and bitmap index on same column(s) 
  • VARCHAR2(32K)
    • Currently max is 4000 bytes  
  • Auto-populate column from a sequence 
    • Using the DEFAULT clause for a column in create table 
CREATE TABLE table_name (
  col1        NUMBER DEFAULT default_seq.NEXTVAL,
  col2        NUMBER DEFAULT ON NULL default_on_null_seq.NEXTVAL,
  description VARCHAR2(30)
);

  • Implicit Result Sets
    • DBMS_SQL.RETURN_RESULT and DBMS_SQL.GET_NEXT_RESULT
    • Result sets that can be returned to a client, but do not necessitate a formal named parameter. The client code to process such a result set is identical now - the client code needs not change, the stored procedure signature need not change
  • PL/SQL Unit Security
    • Grant access to a PL/SQL unit by granting a role to a PL/SQL unit, where the role contains the required rights for accessing the tables - so a function can only select, update etc from a table where it has been granted access.
  • Invisible Columns
    • Hide columns form the table in select and describe
    • SET COLINVISIBLE ON / OFF to display the invisible columns.
CREATE TABLE table_name (
  col1        NUMBER,
  col2        NUMBER INVISIBLE,
  description VARCHAR2(30)
);
  • UTL_CALL_STACK for programmatically inspecting the PL/SQL Call Stack
    • UTL_CALL_STACK package provides an API for inspecting the PL/SQL Callstack. The package complements the DBMS_ UTILITY.FORMAT_CALL_STACK that returns a pretty print human readable overview of the callstack.
  • Pluggable Databases (Multitenant)
    • Create a container database (CDB) that contains all of the oracle level data and data dictionary.  Create pluggable databases (PDB) that contain user data and the user portion of the data dictionary. Since the PDB files contain everything about the user data, you can unplug a PDB from a CDB and plug it into a different CDB and be up in seconds. All that needs to happen is a quick data dictionary update in the CDB.





Monday, March 3, 2008

Introduction to Oracle BPEL (Business Process Execution Language)


Abstract

This article gives an overview to develop Service-Oriented Architecture (SOA) application using oracle BPEL.

Introduction

The World Wide Web Consortium (W3C) defines service-oriented architecture (SOA) as: “a set of components which can be invoked, and whose interface descriptions can be published and discovered.”

* An architectural style for loose coupling between interacting software agents or services using standard web service(SOAP) protocol.
* A set of component that can be invoked

SOA Components



Introduction to Web Services

Web services enable loosely coupled, reusable software components that semantically encapsulate discrete functionality and are distributed and programmatically accessible over standard Internet protocols.

* Simple Object Access Protocol (SOAP) is used to invoke the Web service.
* Web Services Description Language (WSDL) is used to describe the Web service.
* Universal Description, Discovery and Integration (UDDI) is used to publish and query Web services.

The following are file formats used extensively by Web service standards:
XML: Extensible Markup Language (XML) is a set of rules for defining data markup in a plain text format.
XSD: XML Schema Definition (XSD) specifies how to formally describe the elements in an XML document.
XSL: Extensible Stylesheet Language (XSL) is a specification (or template) for separating style from content when creating HTML or XML pages.
XSLT: Extensible Stylesheet Language Transformations (XSLT) is the language used in XSL style sheets to transform XML documents into other XML documents.
XPath: XML Path (XPath) is a language with a set of syntax rules for defining parts of an XML document.

What Is BPEL?

- A markup language for composing multiple services into an end-to-end business process
- A workflow and process flow language
- Synchronous and asynchronous interactions
- Parallel processing
- Exception management
- Provides a way to integrate a set of heterogeneous services to implement business processes

Integrated Adapters


Oracle BPEL Process Designer provides a wizard-driven model approach to exposing various systems and services as a Web service through WSDL generated to publish operations that can be performed by the service.

JDeveloper BPEL Designer provides an adapter framework that supports the following types of adapters:
- File Adapter
- FTP Adapter
- Oracle Advanced Queuing (AQ) Adapter
- Database Adapter
- JMS Adapter
- Oracle Applications Adapter

Difference between Oracle ESB and BPEL

Oracle BPEL is a Business Process Execution Language and as such its optimised for managing and coding business processes, whereas an ESB is quite simply a highly efficient intergration product. Its principle objective is to join two different services together quickly, efficiently and bi-directional. ESB does not have the Sensors which can be used to monitor the activities that can send actions to Business Activity Monitoring (BAM) or database/jms.BPEL data transformations enrich and perform complex changes whereas ESB can perform only simple transformations.

Primarily BPEL is used for Orchestration, data enrichment and also for Human interaction whereas ESB is used for Store and forward transport of data.

Specifically an ESB moves data via
Connects services via different adaptors (WebServices, FTP,File,JDBC etc) and protocols (HTTP,JMS). Enriches and transform data using XSL & domain value mapping lookups. Routes messages based on data in the message payload and/or header and finally and often overlooked feature is that an ESB

ESB:
* ESB (Enterprise Service Bus) implement messaging to enable services to be integrated in a message-based paradigm: both synchronous and asynchronous styles.
* ESB is good for routing messages to multiple destinations. It is also good for doing transformations that have little to no business rules. The footprint is much smaller and incurs minimal overhead therefore the performance is much better.
* ESB virtualizes endpoints that BPEL is orchestrating
* ESB does the heavy lifting of transformations to and from the canonical definition to endpoint definitions of the business objects
* ESB is used for Store and forward transport of data.

BPEL
* Oracle BPEL Process Manager provides a comprehensive, standards-based and easy to
use solution for creating, deploying, and managing cross-application business
processes with both automated and human workflow steps
* BPEL is used for bringing together multiple services. There is much more functionality and allows implementation of complex business logic.
* BPEL takes care of the stateful, long running, orchestration steps
* BPEL operates on the canonical definitions of your business objects - such that
your BPEL process is clean (minimal transformations, assigns) with the focus on
the basic business logic and related compensatory error-handling logic

BPEL Process

1. Synchronous - Client-> Receive Input --> Callback Client
2. Asynchronous - Client -> Receive Input --> reply Output

Process Activites

Interaction - Receive, Reply, Invoke, (User Task), Pick (plus the onEvent, onMessage and onAlarm event handlers)
Structure - Scope, Sequence, Flow, FlowN
Programming logic - While, Switch ,Terminate, Wait, Catch, Throw
Data manipulation - Transform, Assign
Miscellaneous - Java Embedding, Empty