I am developing a database server. Need info about query merging, Particularly how is the view's 'select-query' (described at the time of creating the view) merged with the query fired upon the view. There are some complex cases like setoperators and joins, when merging become extremely difficult.

Oracle docs/MSDN I've already reffered. They don't provide enough info. Can someone refer any link/technical papers?

Thanks in advance