Web Reporting Tool
We also talked about views and how you can create stored windows to your data. Views include all the general capabilities of the SELECT statement, and can be updateable or read-only.
Remember, views are great tools for reporting. You can get your SELECT statement refined and polished, then create a view, and you will not have to reissue the SELECT statement again. You can simply reference the view.
Views are queries used to provide users with a specific view of the data in the database. In doing so, views serve a variety of purposes. They may tie related tables together and then pull selected fields out that specific users need, or they may pull selected interesting rows of data from a table that contains other rows of no interest to specific users.
They may summarize large data sets, returning averages, counts, and the like.
Relational databases are sets of data in tables, when taken alone, are rarely of any use to anyone.
Views allow the database administrator (DBA) to pull fields of interest from tables of interest and return a coherent data set useful to some specific user or application.
A normalized database
is created by designing tables for each object or event being modeled, with the fields of each table representing an attribute of the object or event. Once the developer creates the normalized structure, it becomes necessary to allow users to view specific pieces of data. The users rarely understand the structure, so the DBA is often tasked with building the views that various users require. A view is nothing more than a SQL statement that is stored in the database with an associated name. Views allow the DBA to do the following:
- Structure data in a way that users or classes of users find natural or intuitive
- Restrict access to the data such that a user can see and (sometimes) modify exactly what they need and no more
- Simplify the DBA's job by building base data structures that the DBA can use to build other views in a natural progression
- Summarize data for reports