0 votes
in Sql by

What is a view in the database?

1 Answer

0 votes
by

A View is nothing but a select query with a name given to it or we can simply say a view is a Named Query. Ok! Why do we need a view? There can be many answers for this. Some of the important stuff I feel is:

• A view can combine data from multiple tables using adequate joins and while bringing it may require complex filters and calculated data to form the required result set. From a user's point of view, all these complexities are hidden data queried from a single table.

• Sometimes for security purposes, access to the table, table structures and table relationships are not given to the database user. All they have is access to a view not knowing what tables actually exist in the database.

• Using the view, you can restrict the user update only portions of the records.

The following are the key points to be noted about views:

Multiple views can be created on one table.

Views can be defined as read-only or updatable.

Views can be indexed for better performance.

Insert, update, delete can be done on an updatable view.

Related questions

0 votes
asked Nov 7, 2021 in Sql by rajeshsharma
0 votes
0 votes
0 votes
asked Nov 26, 2020 in Sql by SakshiSharma
...