Sunteți pe pagina 1din 1

SSN COLLEGE OF ENGINEERING

KALAVAKKAM-603 110

DEPARTMENT OF INFORMATION TECHNOLOGY

CS1307 – Database Management Systems Lab

Exercise No.6 - SQL VIEWS, INDEX, SEQUENCES AND


SYNONYMS

Note : Use the tables created for exercise no.5

1. Create a view jview from journey table such that it contains day, time
and route id with j_day, j_time and j_rid as column headings.
2. Update the jview such that j_day is 20-jan-98 and j_rid is 301.
3. Select the contents of the corresponding table that jview is based and
check whether the update has occurred.
4. Create a synonym passenger for ticketdetail table.
5. Display the contents of passenger.
6. Create a synonym bus details for busroute1 table.
7. Drop the passenger synonym created previously.
8. Create an index on route_id column on busroute table.
9. Drop the index what you had created.
10. Create a sequence ticket where minimum value is 1 and maximum
value is 20 and increment it with 2 starting with 1.
11. Insert the sequence ticket into the ticket column of ticket table.
12. Alter the sequence such that the maximum vale is 25.
13. List all the sequences created by you.
14. List all the views created by you.
15. List all the indexes created by you.
16. Drop all the database objects created by you.

S-ar putea să vă placă și