You are on page 1of 2

IS3280 Data Management

Course Assignment - SQL Views

For questions 1-3 you will need to include screen shots from MySQL.

Submit via D2L. Be sure to put your name in the file you submit.

The queries for this assignment use the ‘EliteVideo’ Database tables you created in the last
module. The code for these tables and their data is found in the files create.sql and insert.sql and
would have been created if you completed the assignments in the last module. Again,
instructions for creating these tables and inserting the data are included in the Oracle 11g
Express Launch document. The tables are shown below:

Scenario:
EliteVideo

1. Code a SQL statement to create a view that shows the values of the titles of all the
movies.

CREATE VIEW MovieTitlesView AS


SELECT Movie_title from MOVIE;

2. Describe how views are used to provide an alias for tables. Why is this useful?

Queries written to the view will use the view name, in this case the name of tables from which
the view have been created, as well as the view can be modified without any cause in the queries.
Taking this scenario to show my point, if a SalesAmount view is built on a SALES table, if a
situation warrants that use of a table that is new, say SALES_2, the name can just be updated in
the view definition SalesAmount.

3. Explain how views can be used to improve data security.

views can grant distinct users a particular level of access to a table, two views can be built on a
particular table where a particular user only have a access to read and the other users could
update and as well read data in the table.

You might also like