1 / 5

Views

Views. Automatic View Modifications. Automatic View Modifications. Modifying views Once V defined, want to modify V like any table Modifications to V rewritten to modify base tables Unlike queries, cannot be automated in general. Automatic View Modifications.

asabi
Download Presentation

Views

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Views Automatic View Modifications

  2. Automatic View Modifications Modifying views • Once V defined, want to modify V like any table • Modifications to V rewritten to modify base tables • Unlike queries, cannot be automated in general

  3. Automatic View Modifications Modifications to V rewritten to modify base tables (1) Rewriting process specified explicitly by view creator +Can handle all modifications – No guarantee of correctness (or meaningful) (2) Restrict views + modifications so that translation to base table modifications is meaningful and unambiguous + No user intervention – Restrictions are significant

  4. Automatic View Modifications Modifications to V rewritten to modify base tables (2) Restrict views + modifications so that translation to base table modifications is meaningful and unambiguous + No user intervention – Restrictions are significant Restrictions in SQL Standard for “updatable views”: 1) SELECT (no DISTINCT) on single table T 2) Attributes not in view can be NULL or have default value 3) Subqueries must not refer to T 4) No GROUPBY or aggregation

  5. Automatic View Modifications Modifications to V rewritten to modify base tables (2) Restrict views + modifications so that translation to base table modifications is meaningful and unambiguous + No user intervention – Restrictions are significant Demo: simple college admissions database College(cName,state,enrollment) Student(sID,sName,GPA,sizeHS) Apply(sID,cName,major,decision)

More Related