Thursday, 6 August 2015

Comparing Oracle VERSIONS

Oracle verions: 2,3,4,5,6,7,8, 8i, 9i, 10g, 10g release2, 11g ( fror linux and MS windows), 12c ( Linux, Solaris and Windows)
 'i' and 'g' part of the version name just represents either "Internet" or "Grid"
c for "cloud"

History:
  • 1990: the release of Oracle Applications release 8[59]
  • 1992: Oracle version 7 appeared with support for referential integritystored procedures and triggers.
  • 1997: Oracle Corporation released version 8, which supported object-oriented development and multimedia applications.
  • 1999: The release of Oracle8i aimed to provide a database inter-operating better with the Internet (the i in the name stands for "Internet"). The Oracle8i database incorporated a native Java virtual machine (Oracle JVM, also known as "Aurora").[63]
  • 2000: Oracle E-Business Suite 11i pioneers integrated enterprise application software[59]
  • 2001: Oracle9i went into release with 400 new features, including the ability to read and write XML documents. 9i also provided an option for Oracle RAC, or "Real Application Clusters", a computer-cluster database, as a replacement for the Oracle Parallel Server (OPS) option.
  • 2002: the release of Oracle 9i Database Release 2 (9.2.0)[64]
  • 2003: Oracle Corporation released Oracle Database 10g, which supported regular expressions. (The g stands for "grid"; emphasizing a marketing thrust of presenting 10g as "grid computing ready".)
  • 2005: Oracle Database 10.2.0.1—also known as Oracle Database 10g Release 2 (10gR2)—appeared.
  • 2006: Oracle Corporation announces Unbreakable Linux[59] and acquires i-flex
  • 2007: Oracle Database 10g release 2 sets a new world record TPC-H 3000 GB benchmark result[65]
  • 2007: Oracle Corporation released Oracle Database 11g for Linux and for Microsoft Windows.
  • 2013: Oracle Corporation released Oracle Database 12c[66] for Linux, Solaris and Windows. (The c stands for "cloud".)
------------

At the moment the actual version of Oracle database server is 12c (12.1.0.2) that includes the following remarkable features:
- Oracle Database In-Memory
- Oracle Big Data SQL
- Oracle JSON Document Store
- Oracle REST Data Services
- Improvements to Oracle Multitenant
- Advanced Index Compression
- Zone Maps
- Approximate Count Distinct
- Attribute Clustering
- Full Database Caching
- Rapid Home Provisioning
I’ll also try to place below my first draft of the history of Oracle database innovations and version releases.
2013 – Oracle Database 12c R1
New Multitenant and Pluggable database concept
- Adaptive Query Optimization
- Online Stats Gathering
- Temporary UNDO
- In Database Archiving
- Invisible Columns
- PGA Aggregate Limit setting
- DDL Logging
- Flash ASM
-
2009 – Oracle 11g2
- SQL Performance Analyzer
Deferred segment creation
- Smart Flash Cache
- Automatic block repair from Standby DB
- Edition Based Redefinition
- Oracle RAC One Node
- Oracle Restart
- Instance Caging
ASM Cluster File System (ACFS)
2007 – Oracle 11g
- Real-Time SQL Monitoring
- Query Result Cache
- Advanced Compression Option
- SecureFiles LOBs
- Flashback Data Archive
- Data Recovery Advisor
Automatic Diagnostic Repository (ADR)
-
2005 – Oracle 10gR2
- Transparent Data Encryption
- Transportable Tablespace Support
- ASM Command-Line (asmcmd) utility
- OPatch the Patching Tool
- Database Replay
- Active Session History (ASH) Report
- Automatic Segment Advisor
-
2003 – Oracle 10g: first Grid computing database
- Grid computing – an extension of Oracle RAC
- Automated Storage Management (ASM)
- New self-tuning features (AWR, ADDM)
- Recycle bin
- New database job scheduler (DBMS_SCHEDULER)
- Datapump utility
- SYSAUX tablespace
-
2002 – Oracle 9iR2
- Locally Managed SYSTEM tablespaces
- Data segment compression
- Oracle Streams
- Cluster file system for Windows and Linux
- Logical standby databases with Data Guard
- Default Accounts locked on install
-
2001 – Oracle 9i
- First database to complete the 3 terabyte TPC-H world record
- First database with built-in web services; with integrated data mining; with Hash, Range, Composite and List partitioning; with dynamic memory management; with built-in workflow
- Oracle RAC introduced
- Automated System Managed Undo
- Flashback query
- Oracle Data Guard (new name)
- Dynamic Memory Management
- On-line table and index reorganization
- Resumable backups and statements
-
1999 Oracle8i: First internet ready database
- Integrated JavaVM
- Oracle iFS (Internet File System)
- First database with XML support
- First RDBMS ported to Linux
- Statspack utility
- PL/SQL encrypt/decrypt package
CASE statement in SQL
- User schema concept
- CURSOR_SHARING parameter
- Fast Start recovery
- Log Miner functionality
- OPS Cache Fusion
- Virtual Private Database (VPD)
- Temporary tables
- Drop column on table
- Function based indexes
-
1998
- First database with Java support
- Breaks the 100,000 TPC-C barrier
1997 Oracle8: First Web-enabled database
- Object types
- SQL3 standard
- Parallel DML statements
- Index Organized tables (IOTs)
- Reverse Key indexes
- ROWID format
- Advanced Queuing
- Recovery manager (RMAN)
1996 – Oracle 7.3
- Standby Database
- Bitmapped Indexes
- Partitioned Views
- Index rebuilds
- db_verify utility
- Spatial and Context Data Options
- Histograms
- Oracle trace
-
1995 – First 64-bit RDBMS
1992 – Version 7 
- First a full applications implementation methodology (AIM)
- Partitioning introduced
- Stored procedures and triggers
- Referential integrity with Foreign Keys
-
1988 – Version 6 
- First row – level locking
- First to introduce PL/SQL
- On-line database backups
- B*Tree indexes implemented
- Concept of tablespaces introduced
- Rollback Segments introduced
1987 – First SMP database
1985 – Version 5
- First parallel server database
- First client-server database
- First distributed queries
1984 – Version 4: First database with read consistency
Read consistency concept enabled readers and writers to access the same data without one blocking the other.
1983 – Version 3: First portable Oracle Database
- First portable database offered a choice of what hardware and operating system platform to run on
- First database written entirely in C
- First VAX-mode database
1979 – Version 2: first Oracle Database
First RDBMS version released in 1979 was called Oracle V2. Why not V1? There were two reasons for that: a concern that a version 1 would not awake potential customers’ interest and to show a pseudo- leadership compared to the competitors. First version of RDBMS was created with assembler.
So that was the Roadmap of Oracle Database version releases, current status and the brief history. In case of minor mistakes please correct in comments and I’ll update it. Thanks

Wednesday, 5 August 2015

How to make cognos reports reusable - Explore the new idea of authoring Cognos reports – Part 1

Make query reusable

1 Introduction
2 Problem of current approach
2.1 Current approach
2.2 The major problems
2.2.1 Difficult to author
2.2.2 Difficult to maintain
2.2.3 Difficult to migrate
3 Solution
3.1 Terminology
 3.1.1 Query
 3.1.2 Data container
 3.1.3 Page
 3.1.4 Page set
3.2 Approach
3.2.1 Make query reusable
3.2.2 Make data container reusable
3.2.3 Make page reusable
4 Implementation
4.1 Sample
4.2 Make query reusable
4.2.1 Make query item reusable
4.2.1.1 Case 1: Page set
4.2.1.2 Case 2: Page
4.2.1.3 Case 3: data container – Crosstab
4.2.1.4 Case 4: data container – Product Line Chart
4.2.1.5 Case 5: data container – Product Type Chart
4.2.2 Make Filter reusable
4.2.2.1 Make logic filter reusable
4.2.2.2 Make prompt filter reusable
4.2.3 Use property to control query
4.2.3.1 Case 1: page set
4.2.3.2 Case 2: page
4.2.3.3 Case 3: Crosstab Node member
4.2.3.4 Case 4: Chart Node member

Introduction

The initial motive of researching a new concept is from my consulting job as Cognos consultant, where I’ve spent most of my time to author Cognos reports. It occurs to me that current approach of authoring and migrating reports doesn’t work properly. The real issue is that we don’t make Cognos reports reusable. Given that Cognos report engine doesn’t provide report reusability, this document is intended to explore the practical approach to make report reusable based on current report engine.

Problem of current approach


Current approach


Each report is independently authored by Cognos report developer based on framework manager. As business users want to see report from different angles, many reports based on same framework manager model are developed. The most used method to author these similar reports is copy and paste.

The major problems

Difficult to author

As there is no common library provided, report authors need to figure out where these reports are and somehow to filter out the needed part.  Such a part including query and report is written in the context of the report. There are two tasks to be done: 1) report developers need to somehow understand functionalities of that report; and 2) Report developers need to retrofit these queries and reports into their own report.

Difficult to maintain

As part of newly develop report is copied from another report, there will result in many copies of same logic. When business requirement changes, report developer needs to change all these copies. There are a few challenges:
Need to figure out how many such copies are request to change
Change can’t apply with simple copy and paste, as these copies are not exactly same in different report.

Difficult to migrate

Migration happens when Framework manager changes, or version changes. The similar issues occur as when redeveloper deal with maintenance.

Solution

Terminology

Query

It is Cognos query, regardless of when it is relational and dimensional. It can be complicated and simple query.

Data container

The typical data container is list, crosstab, and chart.

Page

Page contains one or more than one data containers. By the way, query can be used at page level.

Page set

Page set contains one or more than one pages. In addition, burst report can be considered as page set as well.

Approach

Make query reusable

Query is used in report at all levels, including page set (including burst), page and data containers. The query designed in report is different from query executed against data sources. Why? Cognos only takes query items that are used in report to generate real query against data source. Therefore, you can design only one query with many data items, which can serve all data containers. In other word, you can make query reusable for many different data containers, pages or even page sets.

Make data container reusable

In case when more than one data container, such a chart are used in a page, you can use master detail relationship. Define a single chart with all formats, along with title, and you can make this chart reusable. if such a data container is used by multiple pages, then you can use page set make it reusable.  Furthermore, if it is used by multiple reports, we can make this container in a common used library.

Make page reusable

The similar idea can be applied for page. In multiple page situation, page set can be used as parent of pages and assemble report. Again, in case when this page used in multiple report, it should copied into common library.

Implementation

The most important point is to make query reusable, as it is the foundation of this whole reusability approach. In order to illustrate this approach, a sample is introduced; please download report specification for review.

Sample

Create a report book to loop through all product line. This report involves page set, page, crosstab and chart. It uses a single query.
Sample page for camping equipment

Query 1
Page set

Page

Data container / Crosstab / Chart

Make query reusable


A query is composed of query item and filters.

Make query item reusable

As the whole sample report uses a single defined query Query1, it is actually used by following cases by Cognos engine

Case 1: Page set


Product line X
Product type
Year
Revenue
Gross profit
Margin
% Margin


Case 2: Page


Product line X
Product type
Year
Revenue
Gross profit
Margin
% Margin



Case 3: data container – Crosstab


Product Line crosstab node member
Product line
X
Product type
Year
X
Revenue
X
Gross profit
X
Margin
X
% Margin
X


Product Type crosstab node member
Product line
X
Product type
X
Year
X
Revenue
X
Gross profit
X
Margin
X
% Margin
X


Case 4: data container – Product Line Chart


Product line
X
Product type
Year
X
Revenue
X
Gross profit
Margin
% Margin



Case 5: data container – Product Type Chart

Product line
Product type
X
Year
X
Revenue
X
Gross profit
Margin
% Margin




Make Filter reusable

There are two different filters, logic filter and prompt filters. There was some detail sample in old post

Make logic filter reusable

There are two ways to make logic filter reusable. Using Cognos sample, assume that revenue can be calculated based on order methods as follows:
If Region  is  'Americas', only Order method type 'Fax','Mail' are included
If Region  is  'Asia Pacific',  only Order method type 'E-mail','Web' are included
All other regions, all Order method types are included

Conditional logic filter based on prompt

case  when (?pRegion? = 'Americas')     
then  ([Sales (query)].[Order method].[Order method type] in ('Fax','Mail') )
         when (?pRegion? = 'Asia Pacific')
then  ([Sales (query)].[Order method].[Order method type] in ('E-mail','Web') )
         else (1=1)
end


(?Level? = 'SBR' and ?TerritoryId? in ('2101','2102') and [Fact Table].[Dim Table].[Territory Id] in ('2101','2102')) or (?Level? = 'SBR' and ?TerritoryId? not in ('2101','2102') and [Fact Table].[Dim Table].[Territory Id] = ?TerritoryId?) or (?Level? <> 'SBR' and 1=1)



Conditional logic filter with built in business logic

( ([Sales (query)].[Retailers].[Region] ='Americas'
       and [Sales (query)].[Order method].[Order method type] in ('Fax','Mail'))
       or ([Sales (query)].[Retailers].[Region] <>'Americas' and 1=1))
AND
( ([Sales (query)].[Retailers].[Region] ='Asia Pacific'
and [Sales (query)].[Order method].[Order method type] in ('E-mail','Web'))
or ([Sales (query)].[Retailers].[Region] <>'Asia Pacific' and 1=1))

Make prompt filter reusable

The key concept is to make filter as optional filter. It will turn query into a similar behavior as query items. For example, define three optional filter p_ProductLine, p_ProductType and p_Product. It will end up all following 8 combinations, theoretically.
1
No filters
2
p_ProductLine
3
p_ProductType
4
p_Product
5
p_ProductLine, p_ProductType
6
p_ProductType ,p_Product
7
p_ProductLine,p_Product
8
p_ProductLine, p_ProductType ,p_Product



Use property to control query

Case 1: page set


Case 2: page



Case 3: Crosstab Node member


Case 4: Chart Node member