Question: why are views used in database?
Answer: A view is actually a composition of a table in the form of a predefined SQL query. ... Views are used for security purpose in databases,views restricts the user from viewing certain column and rows means by using view we can apply the restriction on accessing the particular rows and columns for specific user.