About database view

Hi,

Anyone who knows the definition of database view?

and what is database view used for?

I'll appreciate it if someone answer my question.

thanks a lot.

Slight smile

  Discussion posts and replies are publicly visible

  • can you please refer to the following article.

    www.javatpoint.com/mysql-view

  • super short: it is a "view" of specific wanted values of two or more DB tables joined by common attributes.

    Example:

    Table "Office" with columns
    Id, office name, addressId, employeeCount,...
    table "address" with columns
    Id, post code, city, street, house number


    you can join then via office.addressId - adress.id fields so a "unique conneciton" is possinle.
    your view CAN have the following columns then: 
    OfficeId, officeName, post code, city, street, house number

    mad by an join SQL statement https://www.w3schools.com/sql/sql_join.asp

    used in Appian context: performance improvements (DB joins are faster), more smaller tables instead of view big tables with redundant data but with view they can be connected easily.

  • The view is virtual table created from the base table and they don't have physical existence in the database. it contains rows and columns like a real table.

    views are used for security purpose, for ex. u have a data of US employee like emp_id, emp_name, emp_department and their emp_SSNNo.....now u dont want to show the SSN number to the user u can hide it using views means u are keeping it secure and hiding confidential info.