Why is synonym in oracle




















If they are not there, it will give you an error telling you that they do not exist. A schema is another word for a user. While a? So what does that make the words? Synonyms, of course! There is, the way is called synonyms. In the following sections we will discuss the creation and removal of synonyms.

A synonym is named, and points to a specific object. EMP using the create synonym command:. EMP table because Oracle will follow the synonym to the correct place as seen here:. Note that we said that this was a private synonym. We can also create public synonyms using the create public synonym command as seen here:. Generally good DBA? They do make management of the database a bit easier, but they also have security and performance issues associated with them. Note that synonyms themselves are not secured.

When you grant object privileges on a synonym, you are granting privileges on the underlying object, and the synonym only acts as an alias in the GRANT statement. Synonyms can be public or private. INDEXes have their own unique namespace. Remember, that you can have: a table and public synonym with the same name a public synonym and a private synonym with same name You cannot have: a table and a private synonym with the same name inside the same schema.

Benefits of Synonyms What are the benefits of using a synonym in database development over a view? Some reasons to use view. They are used to: Hide some columns if you want users to see only specific columns or only specific rows, then you can create a view of that table for other users to access.

You can: query views update insert into delete from views. All operations performed on a view actually affect data in the base table of the view.

They are used to create alias to an object in other databases. However, the target table or view must be available at the time you use the synonym. In addition, synonyms share the same namespace as tables or views, therefore, you cannot create a synonym which has the same name as a table or a view that already exists in the same schema.



0コメント

  • 1000 / 1000