what is view in dbms

what is view in dbms

1 year ago 68
Nature

In DBMS, a view is a virtual table based on the result-set of an SQL statement. It contains rows and columns, just like a real table, but it is not an actual table in the database. Views can be created by selecting fields from one or more tables present in the database. A view can either have all the rows of a table or specific rows based on certain conditions.

Views are considered as a virtual table and are used to simplify SQL queries and allow secure access to underlying tables. They can represent a subset of data contained in a table, which can limit the degree of exposure of the underlying base table to the outer world. Views are used for security purposes in the database and act as an intermediate between real table schemas and programmability.

Views are highly significant as they provide advantages over tasks. They can be used to restrict data access, hide data complexity, simplify commands for the user, and store complex queries. Views can also be used to rename columns without affecting the base tables provided the number of columns remains the same.

To create a view, we can use the CREATE VIEW statement. A view can be created from a single table or multiple tables. We can also query the view to view the data. Views can be deleted using the DROP VIEW statement.

Read Entire Article