Why do you create a View in a database

0 votes
When and why does a database owner decide that a view needs to be created? Why not simply execute a standard stored procedure or select?
Aug 26, 2022 in Database by Kithuzzz
• 38,000 points
540 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes
A view offers a number of advantages.

1. Views may conceal complexity.

If your query involves sophisticated logic or calculations, needs combining many tables, or both, you can build all of that logic into a view and pick data from it just like you would from a table.

2. Views could be a security mechanism.

With permissions defined on the view rather than the underlying tables, a view can choose certain columns and/or rows from a table (or tables). As a result, only the data that a user needs to see can be surfaced.

3. Views can make maintaining legacy code simpler.

You can substitute a table with a view of the same name if a table refactoring would break a lot of code. While the actual schema has changed, the view offers the exact same schema as the original table. By preventing the legacy code that uses the table from failing, you can modify the legacy code whenever you like.

These are only a few of the numerous instances when perspectives can be helpful.
answered Aug 27, 2022 by narikkadan
• 63,600 points

edited Mar 5

Related Questions In Database

0 votes
0 answers

How do you create a yes/no boolean field in SQL server?

How should a yes/no, or boolean, field ...READ MORE

Sep 5, 2022 in Database by Kithuzzz
• 38,000 points
1,086 views
0 votes
1 answer

What do ‘Record’, ‘Field’ and ‘Table’ mean in terms of a database?

Record is the collection of fields, possibly ...READ MORE

answered Oct 6, 2021 in Database by Adebayo fikayo

edited Mar 5 22,564 views
0 votes
2 answers
0 votes
1 answer

How do you count if a cell contains partial text in Excel?

With Formulas, Countif Partial String/Substring Match We can ...READ MORE

answered Mar 30, 2022 in Database by gaurav
• 23,260 points
19,305 views
0 votes
0 answers

How do I get list of all tables in a database using TSQL?

How can I find out the names ...READ MORE

Aug 30, 2022 in Database by Kithuzzz
• 38,000 points
628 views
0 votes
1 answer

How to do a batch insert in MySQL

You can try out the following query: INSERT ...READ MORE

answered Sep 10, 2018 in Database by Sahiti
• 6,370 points
2,430 views
0 votes
0 answers

Altering column size in SQL Server

How to change the column size of ...READ MORE

Aug 23, 2022 in Database by Kithuzzz
• 38,000 points
790 views
0 votes
0 answers

Self Join to get employee manager name

Hello, the columns in my employee table ...READ MORE

Aug 25, 2022 in Database by Kithuzzz
• 38,000 points
650 views
0 votes
1 answer

Correct use of transactions in SQL Server

A transaction in SQL Server is a sequential ...READ MORE

answered Nov 7, 2022 in Others by gaurav
• 23,260 points
672 views
0 votes
1 answer

How do I UPDATE from a SELECT in SQL Server?

MERGE INTO YourTable T USING ...READ MORE

answered Feb 3, 2022 in Database by Vaani
• 7,070 points
944 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP