Mobile Number Portability Process in India

December 4, 2009

You might already know that Mobile Number Portability is set to be rolled into India this year end. As some one who has worked for a telecom company all this year, I feel morally obliged to explain the common public how the Number Portability process works else where and in India. Oh yeah! you caught me, I just found one more reason to blog. :) Read the rest of this entry »


Virtual Columns in Oracle 11g R1

December 3, 2009

I just found out this good feature in Oracle 11g release 1. How many times you felt tired because you were coding again and again for a particular function while selecting data from table?

Consider the following table. The table contains employee name, date of joining. Year of joining will not be stored in database as it can be always derived from one data. An dependable data! Assume, you need it desperately for some sake. One way is use views to achieve the purpose.

With Oracle 11gR1 virtual columns, you can add an virtual column in table for easy selection.

SQL> create table empTable
 2         ( name varchar2(20)
 3         , doj date
 4         , yoj generated always as (to_char(doj,'yyyy')) virtual
 5         )
 6 /
Table created.

Read the rest of this entry »


LISTAGG and PIVOT functions in Oracle 11g R2

December 2, 2009

Analytic functions are first introduced in Oracle 8i. They have got few functions in new release. The first function which I will discuss here will be LISTAGG. It creates a delimited list within a group. Some times you need to toil hard for this. Most of the times, grouping by and converting columns to rows.

With Oracle 11g R2, all you need is the following.

SQL> select deptno,
  2         listagg( ename, '; ' )
  3         within group
  4         (order by ename) enames
  5     from hr.employees
  6    group by deptno
  7    order by deptno
  8   /

  DEPTNO   ENAMES
---------  --------------------
  10       CLARK; KING; MILLER
  20       ADAMS; FORD; JONES;
           SCOTT; SMITH
  30       ALLEN; BLAKE;
           JAMES; MARTIN;
           TURNER; WARD

You can decide what to append with. The syntax is LISTAGG(column, character). Read the rest of this entry »


Width Bucket – Analytic Function

November 29, 2009

WIDTH_BUCKET function is used to assign bucket value for a list of values based on maximum and minimum number. This is one of the new analytic function introduced in Oracle 10g. Consider the following table.

StudentId Mark
1 56
2 43
3 76
4 89
5 90
6 91
7 49
8 63
9 83
10 74
Read the rest of this entry »

Automatic Detection of Data Sources of Result-Cached Function

November 28, 2009

Oracle 11g release 1 gave the option of caching function results. It is done using the optional reference of mentioning RESULT_CACHE keyword. The values of these function calls are stored in system global area (SGA). It will have one result for every unique combination of parameter of passed. These are available for every session. Thus this helps in greatly reducing the execution time of an often repeated complex process inside a function which gets same repeated input values. This will increase performance in high concurrent applications.

In Oracle 11g Release 1

It is mentioned, the best candidate for result caching is function that is invoked frequently and depend on information that changes infrequently or never. Consider the following function.

CREATE OR REPLACE
FUNCTION get_sal (p_emp_id in hr.employees.employee_id%type)
RETURN NUMBER
RESULT_CACHE
IS
lv_sal_rtn       hr.employees.salary%type;
BEGIN
select salary
into lv_sal_rtn
from hr.employees
where employee_id = p_emp_id;

RETURN lv_sal_rtn;

EXCEPTION
WHEN others then
RETURN 0;
END;

Note: the function execution values are stored in SGA by explicitly mentioning RESULT_CACHE. And the downside of this is, at times you can get wrong return values. This is because the values are already cached in memory and not calculated again. Consider the following example. Read the rest of this entry »


Aurora – New ‘concept’ browser from Mozilla labs

April 13, 2009

Mozilla labs has come out with a new browser. With the help of Adaptive path, mozilla has plans to bring out the new browser – Aurora. As what they call as, the concept series of browsers aims at the following -

The Concept Series aims to provoke thought, facilitate discussion, and inspire future design directions for Firefox, the Mozilla project, and the Web as a whole.

So, the future browsers are going to facilitate greater interaction between people.

Aurora – Concept Browser, Part 1

Aurora (Part 1) from Adaptive Path on Vimeo.

New user interfaces

Browsers have come long way since the first browser – Nexus. From plain interfaces to ultra rich user interfaces facilitating higher user interactions. When every thing seems like prototyped, here comes the new concept browser. It has so many functions and options in it, perhaps opening and running it up might require some level of expertise. Lets see how it works out.