Prev | Current Page 221 | Next

Rick Greenwald, Robert Stackowiak, Jonathan Stern

"Oracle Essentials: Oracle Database 11g"

To make names simpler and more readable, you can create a synonym for any
table, view, snapshot, or sequence, or for any PL/SQL procedure, function, or package.
Additional Data Structures | 99
Synonyms can be either public, which means that all users of a database can use
them, or private, which means that only the user whose schema contains the synonym
can use it.
For example, if the user DEMO creates a public synonym called EMP for the table
EMP in his schema, all other users can simply use EMP to refer to the EMP table in
DEMO??™s schema. Suppose that DEMO didn??™t create a public synonym and a user
called SCOTT wanted to use the name EMP to refer to the EMP table in DEMO??™s
schema. The user SCOTT would create a private synonym in his schema. Of course,
SCOTT must have access to DEMO??™s EMP table for this to work.
Synonyms simplify user access to a data structure. You can also use synonyms to
hide the location of a particular data structure, making the data more transportable
and increasing the security of the associated table by hiding the name of the schema
owner.


Pages:
209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233