GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Oracle  >  Database Administration
Go To First  |  Previous Question  |  Next Question 
 Database Administration  |  Question 13 of 231    Print  
What are the advantages of views

  
Total Answers and Comments: 3 Last Update: September 14, 2005   
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: Dan
 
Security 
l Query Simplification 
l Allows Different Perspective 
l Schema Transparency / Location Transparency 
l Schema Consistency 
l Allows work-around for SQL limitations 
 
Security 
• to provide an additional level of table security by restricting access to a 
predetermined set of rows and/or columns of a table 
CREATE VIEW emp_sal_hist_v 
AS 
SELECT ratehist.employee, ratehist.beg_date, ratehist.pay_rate 
FROM ratehist, employee 
WHERE ratehist.company = employee.company 
AND ratehist.employee = employee.employee 
AND USER = employee.user_id; 
 
Query Simplification 
 
For example, a single view might be defined with a join, which is a collection of related columns or rows in multiple tables. However, the view hides the fact that this information actually originates from several tables. Saving of complex queries also permits simplified commands for an end-user who does not know how to make joins and/or cryptic business rules governing a join. 
 
Allows Different Perspective 
 
For example, the columns of a view can be renamed without affecting the tables on which the view is based. 
 
Columns cannot be dropped from tables in version 7.x, but you could recreate views without the unnecessary column. 
 
Schema Transparency / Location Transparency 
 
• Ability to hide the schema of data from the application, and therefore the user. 
 
• For example, if a view's defining query references three columns of a four column table and a fifth column is added to the table, the view's definition is not affected and all applications using the view are not affected. 
 
• Views can also be used to join tables across database schemas OR across databases (using remote links), thereby encapsulating schema names from the end user. 
 
Schema Consistency 
 
• If a web application is accessing legacy data and then we migrate over to a new system. 
 
• Identify legacy tables accessed through the web. 
 
• Create a view look-alike for each legacy table and have it return the samedata. 
 
• Though not a long-term solution, will allow intermediate means of allowing the web application to run while the interface is rebuilt to the new system. 
 
this is all about advantages of view.  
 
Regards, 
Dan

Above answer was rated as good by the following members:
amitkw
June 18, 2005 00:41:41   #1  
soccer_champ        

RE: What are the advantages of views
Views provide many advantages like:

(a) They restrict access to the whole data because they display only selective columns.
(b) They can be used to make complex queries easy. A user can use a simple query on a view to display data from multiple tables without having the knowledge of how to join tables in queries.
(c) Different views can be created from the same data as per the requirements of different types of use groups.

 
Is this answer useful? Yes | No
July 09, 2005 08:05:37   #2  
Dan        

RE: What are the advantages of views
Security
l Query Simplification
l Allows Different Perspective
l Schema Transparency / Location Transparency
l Schema Consistency
l Allows work-around for SQL limitations

Security
to provide an additional level of table security by restricting access to a
predetermined set of rows and/or columns of a table
CREATE VIEW emp_sal_hist_v
AS
SELECT ratehist.employee ratehist.beg_date ratehist.pay_rate
FROM ratehist employee
WHERE ratehist.company employee.company
AND ratehist.employee employee.employee
AND USER employee.user_id;

Query Simplification

For example a single view might be defined with a join which is a collection of related columns or rows in multiple tables. However the view hides the fact that this information actually originates from several tables. Saving of complex queries also permits simplified commands for an end-user who does not know how to make joins and/or cryptic business rules governing a join.

Allows Different Perspective

For example the columns of a view can be renamed without affecting the tables on which the view is based.

Columns cannot be dropped from tables in version 7.x but you could recreate views without the unnecessary column.

Schema Transparency / Location Transparency

Ability to hide the schema of data from the application and therefore the user.

For example if a view's defining query references three columns of a four column table and a fifth column is added to the table the view's definition is not affected and all applications using the view are not affected.

Views can also be used to join tables across database schemas OR across databases (using remote links) thereby encapsulating schema names from the end user.

Schema Consistency

If a web application is accessing legacy data and then we migrate over to a new system.

Identify legacy tables accessed through the web.

Create a view look-alike for each legacy table and have it return the samedata.

Though not a long-term solution will allow intermediate means of allowing the web application to run while the interface is rebuilt to the new system.

this is all about advantages of view.

Regards
Dan

 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
September 14, 2005 01:40:27   #3  
Aruna Bhamidipati        

RE: What are the advantages of views

1. Provide additional level of table security by restricting access to a predetermined set of rows or columns of a table.
2. Hide Data complexity: For example a single view might be defined with a join which is a collection of related columns or rows in multiple tables. However the view hides the fact that this information actually originates from several tables.
3. Simplify Statements for User: Views allow users to select information from multiple tables without actually knowing how to perform join.
4. Present Data in different perspective: Columns of views can be renamed without effecting the tables on which the views are based.
5. Isolate applications from changes in definitions of base tables. If a view is referencing three columns of a four columns table if a fifth column is added or fourth column is changed the view and associated applications are un-affected.
6. Express query that cannot be expressed without using a view. For example a view can be defined that joins a group by view with a table or a view can be defined that joins a UNION view with a table.
7. Saving of complex queries.


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


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape