Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4057660
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T14:58:51+00:00 2026-05-20T14:58:51+00:00

how do views act as a mediator between the actual tables and an end

  • 0

how do views act as a mediator between the actual tables and an end user ? what’s the internal process which occurs when a view is created. i mean that when a view is created on a table, then does it stands like a wall between the table and the end user or else? how do views protect the actual tables, only with the check option? but if a user inserts directly into the table then how come do i protect the actual tables?

if he/she does not use : insert into **vw** values(), but uses: insert into **table_name** values() , then how is the table protected now?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T14:58:51+00:00Added an answer on May 20, 2026 at 2:58 pm

    Non-materialized views are just prepackaged SQL queries. They execute the same as any derived table/inline view. Multiple references to the same view will run the query the view contains for every reference. IE:

    CREATE VIEW vw_example AS
      SELECT id, column, date_column FROM ITEMS
    
    SELECT x.*, y.*
      FROM vw_example x
      JOIN vw_example y ON y.id = x.id
    

    …translates into being:

    SELECT x.*, y.*
      FROM (SELECT id, column, date_column FROM ITEMS) x
      JOIN (SELECT id, column, date_column FROM ITEMS) y ON y.id = x.id
    

    Caching

    The primary benefit is caching because the query will be identical. Queries are cached, including the execution plan, in order to make the query run faster later on because the execution plan has been generated already. Caching often requires queries to be identical to the point of case sensitivity, and expires eventually.

    Predicate Pushing

    Another potential benefit is that views often allow “predicate pushing”, where criteria specified on the view can be pushed into the query the view represents by the optimizer. This means that the query could scan the table once, rather than scan the table in order to present the resultset to the outer/ultimate query.

    SELECT x.*
      FROM vw_example x
     WHERE x.column = 'y'
    

    …could be interpreted by the optimizer as:

    SELECT id, column, date_column 
      FROM ITEMS
     WHERE x.column = 'y'
    

    The decision for predicate pushing lies solely with the optimizer. I’m unaware of any ability for a developer to force the decision, only that it really depends on the query the view uses and what additional criteria is being applied.

    Commentary on Typical Use of Non-materialized Views

    Sadly, it’s very common to see a non-materialized SQL view used for nothing more than encapsulation to simplify writing queries — simplification which isn’t a recommended practice either. SQL is SET based, and doesn’t optimize well using procedural approaches. Layering views on top of one another is also not a recommended practice.

    Updateable Views

    Non-materialized views are also updatable, but there are restrictions because a view can be made of numerous tables joined together. An updatable, non-materialized view will stop a user from being able to insert new records, but could update existing ones. The CHECK OPTION depends on the query used to create the view for enforcing a degree of update restriction, but it’s not enough to ensure none will ever happen. This demonstrates that the only reliable means of securing against unwanted add/editing/deletion is to grant proper privileges to the user, preferably via a role.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a list view which has a couple of views within it, I
I have a custom view which will act as a text field and another
Can MySql 5.0 views use tables that are located on another server? What is
I want to prevent one of my views from exiting when the user presses
I have a Rails application with several models-views-controllers which have some similar characteristics, for
can a single view be used to insert data into three tables simultaneously. am
In my example, I have 3 views: one red view containing two white views.
I built a Custom Cell in IB and in it created a view that
I have a view called gallery that options. I want to listen and act
We are possibly looking at switching our tables, for views in EF 4.3.1. We

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.