|
| Total Answers and Comments: 3 |
Last Update: September 14, 2005 |
|
| | |
|
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 | Go To Top
|