University of Lahore: Department of Software Engineer
University of Lahore: Department of Software Engineer
Assignment#7
Spring Semester, 2020
Due Date: 10 May 2020
Views are a logical virtual table created by “select query” but the result is not stored anywhere in the disk and
every time we need to fire the query when we need data, so always we get updated or latest data from original
tables. Performance of the view depends on our select query. If we want to improve the performance of view we
should avoid using join statement in our query or if we need multiple joins between table always try to use the
index based column for joining as we know index based columns are faster than a non-index based column.
View also allows storing the definition of the query in the database itself.
2. The view must include the PRIMARY KEY of the table based upon which the view has been created.
3. The view should not have any field made out of aggregate functions.
4. The view must not have any DISTINCT clause in its definition.
5. The view must not have any GROUP BY or HAVING clause in its definition.
7. If the view you want to update is based upon another view, the later should be updatable.
8. Any of the selected output fields (of the view) must not use constants, strings or value expressions.