GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  Data Warehousing  >  Business Objects
Go To First  |  Previous Question  |  Next Question 
 Business Objects  |  Question 135 of 242    Print  
what is the difference between derived tables and a view? Which one gives better performance ?

  
Total Answers and Comments: 2 Last Update: March 23, 2007     Asked by: sattin 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: rajesh
 

A derived table is one that is created on-the-fly using the SELECT statement, and referenced just like a regular table or view. Derived tables exist in memory and can only be referenced by the outer SELECT in which they are created. A simple use of a derived table is shown here.

SELECT * FROM (SELECT * FROM Sales) AS a

The inner SELECT produces a derived table and replaces a regular table or view. The key thing to remember when using derived tables is that you must always use an alias (e.g., AS a). The following shows the error produced when the alias is omitted.

SELECT * FROM (SELECT * FROM Sales) -- Results -- Server: Msg 170, Level 15, State 1, Line 3 Line 3: Incorrect syntax near ')'.


which is better view or derived tables?
i feel there is no difference.

When a view is referenced the SELECT of the view is
merged into the SELECT that refereces it, so it is really the same
thing. Of course views save a lot of coding, once written are less
subject to errors, and can have permissions assigned.

but,

when considering logical data independence, security and
reusability as important aspects, using views may be preferred over writing
derived tables over and over again.
--


Above answer was rated as good by the following members:
Swanand A Vaze
March 07, 2007 23:54:11   #1  
rajesh        

RE: what is the difference between derived tables and ...

A derived table is one that is created on-the-fly using the SELECT statement, and referenced just like a regular table or view. Derived tables exist in memory and can only be referenced by the outer SELECT in which they are created. A simple use of a derived table is shown here.

SELECT * FROM (SELECT * FROM Sales) AS a

The inner SELECT produces a derived table and replaces a regular table or view. The key thing to remember when using derived tables is that you must always use an alias (e.g., AS a). The following shows the error produced when the alias is omitted.

SELECT * FROM (SELECT * FROM Sales) -- Results -- Server: Msg 170, Level 15, State 1, Line 3 Line 3: Incorrect syntax near ')'.


which is better view or derived tables?
i feel there is no difference.

When a view is referenced the SELECT of the view is
merged into the SELECT that refereces it, so it is really the same
thing. Of course views save a lot of coding, once written are less
subject to errors, and can have permissions assigned.

but,

when considering logical data independence, security and
reusability as important aspects, using views may be preferred over writing
derived tables over and over again.
--

 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
March 23, 2007 04:43:34   #2  
pat.mclean Member Since: April 2006   Contribution: 52    

RE: what is the difference between derived tables and ...
Hi !

Just an addition,

1. Views play all their rollups at database level. Derived Tables will fetch values into BO's microcube & then will perform the rollup calculations, resulting more process time.

2.As earlier answer suggests, views follow vital security in complience with data design, managed by core database-guys. So it makes sure, the view design is much better & compatible, which may not be if it is a derived table, obviously not in all cases but still in certain scenarios.

I personally favor views over derived tables because they are faster than derived tables. hence improve query performance, compared to derived tables.

Regards,
Pat.

 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    

 Related Questions

Latest Answer : Hierarchy nothing but level comparing or Level of Analysis reports e.g Suppose you can Analysis Product sales Top Level to Low level ( Year->Hal->Qtr-> Mon)…. Like this analysis we create own Hierarchy in report level.Thanks.Sreenivas. ...
Read Answers (5) | Asked by : reddeppa

My query takes 30 min to refresh ...there is any performance tunning is there to reduce refresh time?
Read Answers (10) | Asked by : Reddeppa

Latest Answer : Condition and filters: 1.we can put conditions designer levels as well as report level also. 2. We can restrict some data in Universe level so that you want data we can restrict Universe level. 3. We can put some conditions on report level also ...
Read Answers (7) | Asked by : raghusamarth

Latest Answer : 1.When an object is at the same or higher level of aggregation as the table, it   is compatible with the table.2.When an object is at a lower level of aggregation than the table (or if it is not    at all related to the table), it is incompatible ...
Read Answers (2) | Asked by : manohar

Can you please clarify the difference between compatible and incompatible objects? when we will use these two?
Read Answers (2) | Asked by : manohar

Latest Answer : For Derived table, i am having one scenario.My Database table is having following Column-Empno-Empname-Managernomy Report Requirement is like:report should display Emp name and its corressponding manager name.Based on this reqquirement, i need to design ...
Read Answers (7) | Asked by : Monali

Latest Answer : I have found some differences b/w BO and XI and only the last is specific to XIR2Difference between BO and XI BO uses classic BO Architecture whereas XI uses Crystal Classic Architecture. BO uses 57 tables for BO repo and 8 tables for auditor whereas ...
Read Answers (1) | Asked by : tamiloli

Latest Answer : we should use Detect Aliases and Detect Contexts to formally identify and resolve loops.i.e.if a loop contains only one lookup table then the loop can be resolved by detecting the aliasif a loop is having  2 or more fact tables(multiple ...
Read Answers (1) | Asked by : manohar

Latest Answer : Difference between the Infoview and WI????WebIntelligence is the 'thin-client' (or server version) of Business Objects Reporter. It is used to create report documents. It does not reside on the users computer, but on a server.   InfoView ...
Read Answers (4) | Asked by : sneha

Latest Answer : union operation can be performed on basic cubes, remote cubes, ods objects, master data objects,infosets. i.e u can form union operation simultaneously on cubes, ods, master data objects, infosets. Multi provider does union operation.union operation ...
Read Answers (4) | Asked by : sneha


 Sponsored Links

 
Related Articles

Service Oriented Java Business Integration Review

Service Oriented Java Business Integration Review Introduction If you ve read through the texts which give you an introduction to SOA or Web Services you will often find them to be quite frustrating and the reason for this is because they spend too much time referencing business processes which are
 

Business Intelligence Key Performance Indicators

Business Intelligence Key Performance Indicators What are Key Performance Indicators Key Performance Indicators are also known as Key Success Indicators they help an organization to better define and measure their progress toward professional goals Once an organization has clearly identified its nee
 

How to Best Use Business Intelligence to Your Advantage

How to Best Use Business Intelligence to Your Advantage It is no big secret that today s businesses rely heavily on data and the information it delivers about their companies Whether it is for the purpose of customer acquisition improving operational performance or understanding competitors all of t
 

Business Intelligence in Information Technology

Business Intelligence in Information Technology IT stands for Information Technology Information Technology is a system designed to gather process or distribute information IT can be inspected in terms of the following three groupings; the data gathering the data processing and the data distribut
 

Breaking up XML into Relational Data

Breaking up XML into Relational Data While the preceding example shows how to construct an XML representation over relational data the example in this section illustrates how you can shred XML data back into relational data This reverse operation can be useful if your application works with relation
 

Querying Data with Oracle XQuery

Querying Data with Oracle XQuery Starting with Oracle Database 10g Release 2 you can take advantage of a full featured native XQuery engine integrated with the database With Oracle XQuery you can accomplish various tasks involved in developing PHP Oracle XML applications operating on any kind of dat
 

Retrieving XML Data

Retrieving XML DataTo retrieve XML data from an XMLType table you can use a SELECT SQL statement just as you would if you had to query a relational table For example to select the employee with the id set to 100 from the employees XMLType table discussed in the preceding section you might issue the
 

Business Intelligence Integration

Business Intelligence Integration How to Integrate Business Intelligence within Your Organization Before you Integrate Business Intelligence into your Organization Business Intelligence has developed into strategic process over the years of its extraordinary growth even so it still needs to be incor
 

Business Intelligence Tips

Business Intelligence Tips Understand Your Organization first Truly understanding your company and how it works is perhaps one of the most important Business Intelligence tips anyone can offer This includes understanding the business itself the processes involved the data and how that data is used b
 

Using XMLType for Handling XML Data in the Database

Using XMLType for Handling XML Data in the Database Being an object type XMLType can not only be used to store XML data in the database but also to operate on that data via its built in methods Regardless of the storage model you choose XMLType provides a set of XML specific methods to operate on XM
 





About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape