Friday, May 11, 2007

Life in IT industry

Its almost one and half years in IT industry. I took sometime to think about how this time went/passed by. No doubt, people working in IT industry are always respected in the society for the lucartive money they earn. But many argue that they loss their culture..... (please think urself... whether u contribute for this factor)

In the one and half years, i have not learnt much. If somebody asks... What is the plan you have for the next five years?. Most of the people does not have the answer to this or they have never thought about this question (due to the money and other benefits they get... once they take up the job). and I too... belong to the larger group.

Point: Don't get fascinated by the money you earn in IT industry and loss your focus. Have answers for the following:
  • What do u want to become in the next five years?.... How to achieve this?....Have short plans.. (Write down in a paper and paste it somewhere, so that you get reminded everytime you see it)
  • Have proper investment plans with your money.

I have always felt, whenever i am free, i am simply wasting my time surfing/chatting in the internet. Have Proper plans for the day so that you learn something useful.

Point: Plan for some certifications in the technology u work in. This would help in achieving the goals.

Remebering the basics. I recently attended an interview where i messed up the answers for some of the basic stuffs. Always spare some time to remember the things that you have learnt.

People always say... they lack in motivation, confidence and interest. These all are associated with yourself(self-..........). You may get these, when somebody talks about something...but they are shortlived (Pertain to a particular scope... may be day or so). Remember to bulid these by yourself.

Hey Navaneet..... Its a technical blog...... but to have a great start, i am starting off with this stuff.... to put you all in right track for greater achievements.

Tip for the day: You might have great ideas, but unless you speak out, the ideas are in recyle bin... Speak out before somebody cleans the recycle bin (they speak out the samething after some time)

Keep rocking and have a nice weekend...... and just find some time in between to think about yourself.

Thursday, May 10, 2007

Views in Oracle

What is a view ?
Ans :One simple answer is "Views are Virtual Tables".

What is a Virtual Table ?
Ans :One Simple Answer is a Table that does not have a Physical Memory Storage in the database.

If view does not have a physical memory storage, then how the data is retrieved from a view ?
From Where the data is retrieved ? How the data is retrieved ? What really happens when you query a view? How does a view help in performance ?

If you do not have answers to the above questions , do consider the following

A view is simply the representation of a SQL statement that is stored in memory, so
that it can be reused.

SELECT empid FROM emp;

If the above query is most frequently used, then I would like to make it a view.

For creating a view,

CREATE VIEW view_emp
AS
SELECT empid FROM emp;

The above statement will create a view and does not result in anything that is actually
stored in database, except for an entry in the data dictionary entry that defines this view.

For querying this view,

SELECT * FROM emp_view WHERE empid BETWEEN 500 AND 1000;

Oracle will transform this query as

SELECT * FROM (SELECT empid FROM emp) WHERE empid BETWEEN 500 AND 1000;

Oracle stores a view's definition in the data dictionary as the text of the query that defines the view.

When you reference a view in a SQL statement, Oracle:

1. Merges the statement that references the view with the query that defines the view
2. Parses the merged statement in a shared SQL area
3. Executes the statement

Oracle parses a statement that references a view in a new shared SQL area only if no existing shared SQL area contains a similar statement. Therefore, you get the benefit of reduced memory use associated with shared SQL when you use views.

Since view does not have a physical memory storage they are said to be "Virtual Tables".
We are querying the data which is already stored in the database ; rendering data from a view is relatively faster.

Shared SQL Area : A Shared SQL area is required, to process every unique SQL statement submitted to
a database and contains information such as the parse tree and execution plan for the corresponding statement.

This is a basic information regarding views. We will be discussing more interesting concepts.