VIEWS

A view is a logical or virtual table which does not exist physically in the database. Views are also called Dictionary Objects. Advantages of Views are security; complexity; logical columns can be created; Views can represent a subset of the data which is contained in a table; Views can join and simplify multiple tables into a single virtual table; Views can act as aggregated tables, where the database engine aggregates data such as sum, average etc. and presents the calculated results as part of the data; Views take very little space to store. The database contains only the definition of a view, not a copy of all the data it presents. Views can be classified into two categories based on the way they are created: simple view and complex view.

Summary

A view is a logical or virtual table which does not exist physically in the database. Views are also called Dictionary Objects. Advantages of Views are security; complexity; logical columns can be created; Views can represent a subset of the data which is contained in a table; Views can join and simplify multiple tables into a single virtual table; Views can act as aggregated tables, where the database engine aggregates data such as sum, average etc. and presents the calculated results as part of the data; Views take very little space to store. The database contains only the definition of a view, not a copy of all the data it presents. Views can be classified into two categories based on the way they are created: simple view and complex view.

Things to Remember

  1. A view is a logical or virtual table which does not exist physically in the database. Views are also called Dictionary Objects. Advantages of Views can be listed as below: 

    • Security- The confidential columns can be suppressed from viewing and manipulation.
    • Complexity can be avoided.
    • Logical columns can be created.
    • Views can represent a subset of the data which is contained in a table.
    • Views can join and simplify multiple tables into a single virtual table.
    • Views can act as aggregated tables, where the database engine aggregates data such as sum, average etc. and presents the calculated results as part of the data.
    • Views take very little space to store. The database contains only the definition of a view, not a copy of all the data it presents.
  2. Views can be classified into two categories based on the way they are created and they are: 
    Simple View: If the view is created from a single table, it is called as simple view. DML operations can be performed if it is Simple View.
    Complex View: If the view is created on multiple tables, it is called as a complex view.
  3. In order to create view, we must write the following syntax:

    Create View as

MCQs

No MCQs found.

Subjective Questions

No subjective questions found.

Videos

No videos found.

VIEWS

VIEWS

Views

A view can be understood as a logical or virtual table which does not exist physically in the database. Views are also called Dictionary Objects. Advantages of Views can be listed as below:

  • Security- The confidential columns can be suppressed from viewing and manipulation.
  • Complexity can be avoided.
  • Logical columns can be created.
  • Views can represent a subset of the data which is contained in a table.
  • Views can join and simplify multiple tables into a single virtual table.
  • Views can behave as aggregated tables where the database engine aggregates data such as sum, average etc. and presents the results calculated as part of the data.
  • Views take very little space to store. The database contains only the definition of a view not a copy of all the data it contains.

Views can be classified into two categories based on the way they are created and they are:

  • Simple View: If the view is created from a single table, it is called as the simple view. DML operations can be performed if it is Simple View.
  • Complex View: If the view is created on multiple tables, it is called as a complex view.

In order to create view, we must write the following syntax:

Create View <View Name> as <Query>

For example:

  • A view of instructions without their salary
    Create view faculty as
    select ID, name, dept_name
    from instructor
  • Create a view of department salary totals
    create view department_total_salary(dept_name, total_salary)as
    select
    dept_name,sum(salary)
    from instructor
    group by dept_name;

References:

  1. H.F.Korth and A. Silberschatz,"Database system concepts",McGraw Hill,2010
  2. A.K.Majumdar and p, Bhattacharya,"Database Management Systems",Tata McGraw Hill,India,2004
  3. F.Korth, Henry. Database System Concepts. 6th edition.

Lesson

Relational Languages and Relational Model

Subject

Computer Engineering

Grade

Engineering

Recent Notes

No recent notes.

Related Notes

No related notes.