Difference between view and synonym - Oracle DB
View is a virtual table
- It can be created on a table or another view.
- It is just like a window through which we can access or change base table data.
- It does contain data of its own. It always takes data from its base table.
- It is stored as a query in data dictionary.Whenever you query a view it gets data from its based table using this query.
Main advantage of using views
- You can restrict access to predetermined set of rows and columns of a table
- You can hide complexity of query
- You can hide complexity of calculation
Synonym is alternate name given to table, view, sequence or program unit.
-It is used to mask real name and owner of the object.
- You can provide public access to tables by creating public synonyms.
- It can be created on a table or another view.
- It is just like a window through which we can access or change base table data.
- It does contain data of its own. It always takes data from its base table.
- It is stored as a query in data dictionary.Whenever you query a view it gets data from its based table using this query.
Main advantage of using views
- You can restrict access to predetermined set of rows and columns of a table
- You can hide complexity of query
- You can hide complexity of calculation
Synonym is alternate name given to table, view, sequence or program unit.
-It is used to mask real name and owner of the object.
- You can provide public access to tables by creating public synonyms.
Comments
Post a Comment