View

Definition & Meaning

Last updated 23 month ago

What is View?

A view is a subset of a Database that is generated from a user question and receives saved as a permanent Object.

In a structured question language (SQL) Database, for Instance, a view will become a type of virtual Table with Filtered rows and columns that mimic the ones of the unique database. While the table generated in a view is permanent, the statistics inside Fields is situation to alternate in line with the supply database.

Views allow statistics analysts to recogNition attention on specific varieties of Records in a database. They are smooth enough to create and store that even a ciTizen facts scientist can use views to segment a massive database into smaller, extra practicable sections for analysis and near-up look at.

What Does View Mean?

A view is definitely a based question language (SQL) Query saved as an object.

How a View is Created

A view allows the person to govern the aMount and precise standards of the facts they may be pulling from a Relational Database.

For example, the CUSTOMER_MASTER and ACCOUNTS_MASTER tables inside the Relational database of a commercial financial institution are regularly queried for Clients and their account numbers. The following SQL query returns first call, surname, account wide Variety(s) and account varieties of clients:

SELECT c.First_name, c.Surname, a.Account_number, a.Account_type

FROM customer_master c, accounts_master a

WHERE c.Customer_id=a.Customer_id

ORDER BY c.Surname, a.Account_number

Under regular circumstances, whenever this question is administered, it must be Parsed and loaded into the SQL optimizer. This consumes precious time and Compute resources.

If the question is stored as a view, but, then overhead activities will simplest be achieved once on the time the view is created.

A sample SQL script to create a view is given underneath:

CREATE VIEW customer_accounts AS

(

SELECT c.First_name, c.Surname, a.Account_number, a.Account_type

FROM customer_master c, accounts_master a

WHERE c.Customer_id=a.Customer_id

ORDER BY c.Surname, a.Account_number

)

The Limitations of View

While views have endless benefits with regards to working with massive databases in SQL, the view queries tends to fall brief in a handful of factors which includes:

  • Location Restriction – Both the view and the source database must be inside the identical location garage-wise.
  • Lack of Compatibility – The consumer can either use fashionable SQL or legacy SQL queries to create a view, however not blend the two.
  • Read-only – When perspectives are examine-handiest, the user can carry out minor calculations on records, but the results will have no effect on the original database.
  • Non-synchronized – Although gadgets within the supply database are stored whilst a view is created, editing them will no longer affect the principle database. As a result, future queries may be accurate on the subject of the database, but now not the view table and vice-versa.

Share View article on social networks

Your Score to View article

Score: 5 out of 5 (1 voters)

Be the first to comment on the View

10447- V5

tech-term.com© 2023 All rights reserved