Data roots when queried through a view

Data roots when queried through a view

When we query data through a view, is the data stored in the view or the table? Is data from a view stored in the database?

    Requires Free Membership to View

    When you register, my team of editors will also send you resources covering Linux administration and management; integration and interoperability between Linux, Windows and Unix; securing Linux and mixed-platform environments; and migrating to Linux.

    Margie Semilof, Editorial Director

    By submitting your registration information to SearchEnterpriseLinux.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchEnterpriseLinux.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

A VIEW is a compiled object. Data is always stored in the databases tables and through view you are looking at the underlying data

SELECT a.col1, b.col2 from TABLE_A a, TABLE_B b WHERE a.col3 = b.col4

is equivalent to:

CREATE VIEW a_view
AS
SELECT a.col1, b.col2 from TABLE_A a, TABLE_B b WHERE a.col3 = b.col4

SELECT * FROM a_view

This was first published in March 2006