From the course: Database Foundations: Database Management

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Save queries as database view objects

Save queries as database view objects

From the course: Database Foundations: Database Management

Start my 1-month free trial

Save queries as database view objects

- [Instructor] When it comes to the types of objects that reside in a database, tables tend to get all of the attention, but there is another object type that's equally important, and they're called views. You know that old saying that if it looks like a duck, walks like a duck, and quacks like a duck, then it's a duck. Well, that actually does not apply to database views. View objects look like tables, can be queried like tables, return result sets like tables, but they're definitely not tables. Views are virtualized tables that pull records in rows out of your existing data tables and reconfigures them to suit a variety of needs. When you run a view, the server fetches the requested columns and rows from the underlying database tables, and it returns the values in the form of a record set. Now if you're thinking to yourself, that sounds a lot like what a query does, then you're absolutely correct. Views are simply queries. The same select queries that you've been working with that…

Contents