What are the advantages of using views. Why do we need
views when we have SPs?
Answer Posted / dr.job418
A view provides several benefits.
1. Views can hide complexity
If you have a query that requires joining several tables, or has complex logic or calculations, you can code all that logic into a view, then select from the view just like you would a table.
2. Views can be used as a security mechanism
A view can select certain columns and/or rows from a table, and permissions set on the view instead of the underlying tables. This allows surfacing only the data that a user needs to see.
3. Views can simplify supporting legacy code
If you need to refactor a table that would break a lot of code, you can replace the table with a view of the same name. The view provides the exact same schema as the original table, while the actual schema has changed. This keeps the legacy code that references the table from breaking, allowing you to change the legacy code at your leisure.
These are just some of the many examples of how views can be useful.
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is data set in report?
What are the security related catalog views? : sql server security
What is sql server schema compare? How we can compare two database schemas?
How many types of cursor type are there?
what is database replicaion? : Sql server database administration
1. Tell me your daily activities 2. If sql server installation fails at time installation what will do 3. Where does the sql server installation log details are stored 4. After the installation what will you do for memory configuration 5. What is the difference between SQL max maximum memory and AWE memory 6. How will you configure AWE memory 7. How will setup an email alert for the backup job 8. After the SQL installation what are the jobs will you configure 9. What does –g mean in the sql startup parameter 10. What is the difference between Bulked log and Full recovery model 11. What is the difference between mirroring and log shipping 12. What are the steps to be followed before in-place up gradation 13. After installing the patch the sql server does not start and application team tells to rollback the changes .In this scenario what will you do
According to you what goes into making the best database administrator? : sql server database administration
what is checksum in sql server.........???
Do you know what is fill factor and pad index?
How do we know if any query is retrieving a large amount of data or very little data?
I have triggers,views,functions,stored Procedures for a table. When I am dropping that table which objects are deleted?
How ssrs maintain security?
What is the library index called?
Why I am getting "the microsoft .net framework 2.0 in not installed" message?
What is a database table?