Lab11 - Index and View
Lab11 - Index and View
Weekly Workshop/
Lab Activities for
Week 11
Page | 0
Activity Set 1: Index and View [Individual Activity] [30 min]
Objectives:
To investigate views & indexes
Requirements:
MovieCo database
Import the following files:
o Week 8_lab_create.txt
o Week 8_lab_insert.txt
MovieCo ERD has been copied from Week 8 lab sheet here:
Page | 1
Page | 2
Index:
Select MovieCo database, go to the SQL table and write the SQL statements necessary to provide the
following:
1) Show the index on following tables: Membership, Price, and Movie. Explain briefly some of the
features in the output.
3) Drop the index you have created above. If you show the index in tables after dropping, you will
see indexes are now like they were in the original table!
View:
Select MovieCo database, go to the SQL table and write the SQL statements necessary to provide the
following:
1) Create a new view called AddressBook from the Membership table. The view should contain the
Member ID, Full Name, and Full Address.
Page | 3
2) Show the AddressBook view by clicking Views as follows:
3) Now, update the member name and address of the member with ID 107 as
follows:
After the above update see the update both in the membership table and
AddressBook view!
After the above insertion see the update both in the membership table and
AddressBook view!
Requirements:
Students are advised to attend as many labs as they want in this week.
Get feedback, correct your solutions and proceed to finalise your submission online
Remember, you will need to complete Weeks 7-10 lecture concepts and lab activities to
perform Tasks 1 to 3 as follows:
Tasks Concepts & Activities to follow Consultation in Weeks
Task 1 Week 7 Week 9
Task 2 Week 7 Week 10
Task 3 Weeks 8-10 Week 11
See the detail requirements in the assignment specification file.
Submission deadline:
• For deadline, see the course website.
• Submit online at the course website
Page | 6