O'Reilly logo

Building Scalable and High-Performance Java™ Web Applications Using J2EE™ Technology by Greg Barish

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Other Important Database Objects

There's actually much more to physical database design than tables, rows, and constraints. However, it was necessary to discuss queries in some detail before we introduced other important database objects. I call them “important” because they can play a role in tuning an application for performance and scalability. We'll discuss the “how” part later. For now, let's review what these objects are.

Views

A view is a “pseudo-table” derived from a legal query. For example, consider the query

SELECT emp_name FROM employee;

which returns the following data:

Hannah Smith
Dan Dessens
Jill Arroyo

We can create a view EMPLOYEE_V for this query with the following SQL:

 CREATE VIEW employee_v AS SELECT emp_name FROM employee; ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required