Views and Data management

Views:

Sets, Records and networks that are actually stored are called base objects. Any enquiry evaluates to a virtual set of records which may be displayed on the user's screen fed to a additional query deleted from an existing set inserted into an existing set or copied to form a new base set. More significantly for this discussion the query definition may be stored as a named m. The principal dissimilarity between a copy and a view is that updates to the original sets that produced the virtual set will be reflected in a view but will not affect a copy. A outlook is a dynamic picture of a query whereas a copy is a static picture.

There is a require for both views as well as copies. Someone desiring to record the monthly sales volume of every department might run the following transaction at the end of each month (an arbitrary syntax):

MONTHLY_VOLUME=
SELECT DEPARTMENT, SUM(VOLUME)
FROM SALES GROUPED BY DEPARTMENT;
The fresh base set MONTHLY_VOLUME is defined to hold the answer. Alternatively the current volume can be gotten by the view:
DEFINE CURRENT_VOLUME (DEPARTMENT, VOLUME) VIEW AS:
SELECT DEPARTMENT, SUM(VOLUME)
FROM SALES
GROUPED BY DEPARTMENT;

Afterwards any updates to the SALES set will be reflected in the CURRENT_VOLUME view. Yet again CURRENT_VOLUME may be used in the same ways base sets can be used. For illustration one can compute the difference between the current and monthly volume.

The semantics of views are fairly simple. Views are able to be supported by a process of substitution in the abstract syntax (parse tree) of the statement. Every time a view is mentioned it is replaced by its definition.

To summarize any query calculate to a virtual set. Naming this virtual set formulates it a view. Afterwards this view can be used as a set. This permit views to be defined as field and record subsets of sets statistical summaries of sets and more complex combinations of sets.

There are three main reasons for defining views

Data independence - giving programs a logical view of data thus isolating them from data reorganization.

Data isolation - giving the program precisely that subset of the data it needs thus minimizing error propagation.

Authorization - beating sensitive information from a program its authors and users.

As the database evolves records as well as sets are often ‘reorganized’. Changing the underlying data shouldn’t cause all the programs to be recompiled or rewritten therefore long as the semantics of the data is not changed. Old programs must be able to see the data in the old way. Views are developing to achieve this.

Usual reorganization operations include:

  • Adding fields to records.
  • Splitting records.
  • Combining records.
  • Adding or else dropping access paths.

Simple view of base records perhaps obtained by:

  • Renaming or else permuting fields,
  • Converting a representation of a field.

Simple variations of base sets perhaps obtained by:

  • Choosing that subset of the records of a set which satisfy some predicate;
  • Projecting out a few fields or records in the set.
  • Combining existing sets together into fresh virtual sets that is able to be viewed as a single larger set.

Consider the illustration of a set of records of the form:

442_set of records.jpg

A few applications might be only interested in the name and telephone number others might want name and address while others might want name and account number and of course one application would like to see the whole record. Views are able to appropriately subset the base set if the set owner decides to partition the record into two new record sets:

731_record sets.jpg

Programs that utilized views will now access base sets (records) and programs that accessed the entire larger set will now access a view (logical set/record) This larger view is defined by:

DEFINE VIEW WHOLE_THING:
SELECT NAME, ADDRESS, PHONE_NUMBER, ACCOUNT_NUMBER
FROM PHONE_BOOK, ACCOUNTS
WHERE PHONE_BOOK.NAME = ACCOUNTS.NAME;

Views and Update:

Any view is able to support read operations nevertheless since only base sets are actually stored only base sets be able to actually be updated. To make an update via a view it should be possible to propagate the updates down to the underlying base set.

If the view is very simple (example record subset) then this propagation is straightforward. If the view is the one-to-one mapping of records in a few base set but some fields of the base are missing from the view then update and delete present no problem but insert requires that the unspecified (invisible) fields of the new records in the base set be filled in with the ‘undefined’ value. This may or mayn’t be allowed by the integrity constraints on the base set.

Beyond these extremely simple rules propagation of updates from views to base sets becomes dangerous, complicated and sometimes impossible.

To give an instance of the problems consider the WHOLE_THING view mentioned above. Deletion of a record may be executed by a deletion from one or both of the constituent sets (PHONE_BOOK and ACCOUNTS). The correct deletion rule is depending on the semantics of the data. Alike comments apply to insert and update.

My colleagues and I have submissive ourselves to the idea that there is no elegant solution to the view update problem. (Materialization (reading) isn’t a problem!) Existing systems utilized either very restrictive view mechanisms (subset only), or they offers incredibly ad hoc view update facilities. We propose that easy views (subsets) be done automatically and that a technique akin to that used for abstract data types be used for complex views- the view definer will specify the semantics of the operators NEXT, INSERT, FETCH, DELETE and UPDATE.

Latest technology based Operating System Online Tutoring Assistance

Tutors, at the www.tutorsglobe.com, take pledge to provide full satisfaction and assurance in Operating System help via online tutoring. Students are getting 100% satisfaction by online tutors across the globe. Here you can get homework help for Operating System, project ideas and tutorials. We provide email based Operating System help. You can join us to ask queries 24x7 with live, experienced and qualified online tutors specialized in Operating System. Through Online Tutoring, you would be able to complete your homework or assignments at your home. Tutors at the TutorsGlobe are committed to provide the best quality online tutoring assistance for Operating System Homework help and assignment help services. They use their experience, as they have solved thousands of the Operating System assignments, which may help you to solve your complex issues of Operating System. TutorsGlobe assure for the best quality compliance to your homework. Compromise with quality is not in our dictionary. If we feel that we are not able to provide the homework help as per the deadline or given instruction by the student, we refund the money of the student without any delay.

©TutorsGlobe All rights reserved 2022-2023.