0

I get general knowledge from Difference between View and table in sql

but still don't know the real thing.

Also sometimes View can do Insert Update Delete [If not affect multiple base tables] (I've tried this).

is there any big diference when I do Insert/Update/Delete from View than From Table ?.

What I expect from View is "there will be more security to protect real table when client access view than access real table".

If not is there any other way to tightening security when, client access real table from database. other than Login with usename and password ?

  • thx -
Community
  • 1
  • 1
Denni S
  • 134
  • 1
  • 15

1 Answers1

1

There's nothing more inherently secure about using a view instead of a table -- it has to do with how you use it. Views let you screen access to tables at the column level, the existence of joins across tables making up the view of data, and rows matching (or not matching) certain criteria. If you can make your data more secure with a view by doing that, then by all means do so. I would not use views as a general replacement for tables, however.

A downside of a view is that you have another object to maintain, and when your underlying tables change, something that can break. Personally, I haven't used views to enhance security for write operations because it has never made sense in my case. For reading purposes, they can be really terrific.

Good security should start with properly constructed roles and grants and that you don't give certain roles/users access to operations they don't need.

Tony Pierce
  • 788
  • 1
  • 6
  • 11