Uploaded by chetansharma1878

dbms 1

advertisement
NAME :- Anurag bhardwaj
ROLL no :- 13
SEC :- D1
Q- TO CREATE AND MANUPULATE VARIOUS DATABASE OBJECTS OF THE TABLE
USING VIEW.
A database view is a virtual table that presents a subset of data from one or more
tables in a database. Views can be used to simplify complex queries, protect
sensitive information, and provide users with a customized view of the data.
To create a view in a DBMS, you can use the CREATE VIEW statement. Here's an
example:-
This creates a view called my_view that selects certain columns from my_table
based on a condition.
Once you have created a view, you can manipulate it just like a regular table using
SQL statements such as SELECT, UPDATE, DELETE, and INSERT. For
example:
This will select all the rows and columns from the my_view view.
You can also modify the underlying tables that the view is based on using SQL
statements. For example:
In summary, views are a powerful tool for manipulating data in a DBMS. They
allow you to create customized views of your data and simplify complex queries.
You can manipulate views just like regular tables using SQL statements, and
changes to the underlying tables are automatically reflected in the views.
Download