What is the difference between synonym and view in oracle




















Synonym is alternate name for database objects like Table, views, procedure, function , etc. Email This BlogThis! Share to Twitter Share to Facebook. Location: Hyderabad, Telangana, India. I Agree with krishna. HI Bro, Table :- It is a collection of row and column and it is a basic sotage unit view :- IT logically represents subset of data from one or more tables synonym :- It is Alternative name of Object. Hi this shiva prasad chitta Synonyms are created on only one single object - a table, a view, a function, a stored procedure etc.

If a view is a single table view, it would be updateable, however, if it is comprised of complex calculations and joins, it is not directly updateable - one has to write Instead Of triggers IO triggers in order to make them updateable. Synonyms when created on tables or single table views are updateable since they are created on a single object. Synonyms are just a logical definition. For a view, one needs to specifically grant privileges since there is no such thing like a public or a private view.

Re: Difference between cursor, ref cursor? Good morning everybody, what is the difference between cursor and ref cursor? In which circumstances we use these both and how to use?

Specify the schema to contain the synonym. If you omit schema , then Oracle Database creates the synonym in your own schema. Specify the object for which the synonym is created. The schema object for which you are creating the synonym can be of the following types:. The schema object need not currently exist and you need not have privileges to access the object. If you do not qualify object with schema , then the database assumes that the schema object is in your own schema.

If you are creating a synonym for a procedure or function on a remote database, then you must specify schema in this CREATE statement. Alternatively, you can create a local public synonym on the database where the object resides. However, the database link must then be included in all subsequent calls to the procedure or function.

Synonym is alternate name given to table, view, sequence or program unit. Synonyms in Oracle can be created as a public or a private synonym. For a view, one needs to specifically grant privileges since there is no such thing like a public or a private view. As it is already clear to everyone the purpose of synonyms and views, it should also be clear that view can consume significantly more resources than a synonym.

In fact a view may consume x or even x more resources that an synonym! To store a synonym, it needs to store the name of the synonym, the name of the target maybe and some internal reference keys and other stuff. Lets say this takes bytes.

Heck, it could be really, really long. Plus, you got to give it a name! It probably takes at least bytes to store basic information about a view, and who knows how much for a really long and complex one. From: Nick Galemmo via oracle-db-l [mailto:oracle-db-l Groups.

Something to think about when optimizing your environment! No Account? Sign up.



0コメント

  • 1000 / 1000