Nội dung text Untitled document - 2024-09-02T145212.632.pdf
c. What are the disadvantages of views? Answer: Disadvantages: 1. When a table is dropped, associated view become irrelevant. 2. Since view are created when a query requesting data from view is triggered, its bit slow 3. When views are created for large tables, it occupy more memory . d. Write the syntax to delete view. Answer: DROP VIEW view_name; Exercise: 1. Write output of the following queries. i. Create view emp_view as select emp_no, enema, salary from emp; ii. Update emp_view set e_name=’Jay’ where emp_no=101; iii. Delete from emp_view where emp_no= 105; iv. Drop view emp_view; Practicalkida.com
● Output: The indexes dept_simple_index and dept_composite_index are removed. x. Create Index on emp ● Output: The index raj is created, improving the performance of queries that filter by both emp_no and ename. 2 Write output of following queries. a. Create sequence emp_sequence Incremented by 2 Start with 1 Nomaxvalue Nocycle Cache 10; Answer: Sequence EMP_SEQUENCE created. b. Alter sequence emp_sequence Incremented by 15 Max value 1000 Cycle Cache20; Answer: Sequence EMP_SEQUENCE altered. c. Drop sequence emp_sequence; Answer: Sequence EMP_SEQUENCE dropped. Practicalkida.com