Jump to content
xisto Community
Sign in to follow this  
Ananya

Should Data Access Be Allowed Through Views Instead Of Tables?

Recommended Posts

A view can be created as Create view view_name as <query>Primarily 2 important advantages can be achieved if one provides access through Views and not through actual Tables:-1) Added security- One can always restrict a user from viewing certain things by creating a view that we wish to allow the users to see and not the ones that are secured enough to let users to. One can grant permissions to views itself.2) Simple presentation- We can always remove complexity of data to be viewed by users by creating views and let them selecting data from views and not the actual table.So that they don't get confused by seeing extra fields that the user hasn't intended to see.

Share this post


Link to post
Share on other sites

Views are really great and most bigger databases require to create views for making things simple. If you always use a big select query to achieve something, you can always create a view and use it in your sql queries when creating reports or forms and etc. Also, you can control data which can be viewed, if you need to change something, you change it in one place and don't need to go through all your code and change it?But there is no reason, excpet for security to create views with duplicate table data, like this:create or replace view view1 as select * from table1;It's good if for some specific people/users you need to restrict some columns or some data, but for that you will need to change the sign * to column names and maybe if necessary add conditions to filter some data.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.