71.Define SQL Update Statement ?
SQL Update is used to update data in a row or set of rows specified in the filter condition.The basic format of an SQL UPDATE statement is, Update command followed by table to be updated and SET command followed by column names and their new values followed by filter condition that determines which rows should be updated.
72. Define SQL Delete Statement ?
SQL Delete is used to delete a row or set of rows specified in the filter condition.The basic format of an SQL DELETE statement is, DELETE FROM command followed by table name followed by filter condition that determines which rows should be updated.
73.What is a materialized view?
Materialized views are also a view but are disk based. Materialized views get updates on specific duration, base upon the interval specified in the query definition. We can index materialized view.
74.What are the advantages and disadvantages of views in a database?
1.Views don’t store data in a physical location.
2. The view can be used to hide some of the columns from the table.
3. Views can provide Access Restriction, since data insertion, update and deletion is not possible with the view.
1. When a table is dropped, associated view become irrelevant.
2. Since the view is created when a query requesting data from view is triggered, its a bit slow.
3. When views are created for large tables, it occupies more memory.
75.What is a Composite Key ?
A Composite primary key is a type of candidate key, which represents a set of columns whose values uniquely identify every row in a table.
For example – if ‘Employee_ID’ and ‘Employee Name’ in a table is combined to uniquely identify a row its called a Composite Key.