FutureStarr

Access Synonym

Access Synonym

Access Synonym

Access Synonym

Depending on the context, the word "access" broadly refers to different phenomena. We think of "access" in terms of physical access, physical/logistical access, etc. Learn more about the origins of this word, explore other definitions, and see how you can use it in your writing.

Using Synonyms in Sap Hana

When I started to write a document on the usage of synonyms in XS Advanced, I noticed, that even though most people I talked to knew how synonyms work in principle, most people (including me) had their problems when it came to details. Whereas in classical SQL usage of synonyms is optional, in XS Advanced they will be the only way to access objects of a different schema.

What Is a Synonym?

Synonyms are aliases for DB objects, but are no real DB objects by themselves (even though you can find them in view SYS.OBJECTS) . Whenever you use a synonym, try to mentally replace it by its base object, that’s pretty much the same what the DB is doing. A synonym belongs to its own schema, which is independent of the schema the DB object belongs to (of course, a synonym and its base object can have the same schema). Currently, synonyms can be created for tables (this includes virtual tables), views, procedures, table functions, scalar functions and sequences. You can use synonyms to hide the concrete object names from consumers, allowing you to exchange the concrete objects later, without the need of changing their consumers. Also, you can use a synonym to give an object a more convenient name, possibly in your own schema. There is no measurable performance penalty for using synonyms instead of their base objects

Create Synonym

statement to create a synonym, which is an alternative name for a table, view, sequence, procedure, stored function, package, materialized view, Java class schema object, user-defined object type, or another synonym.

 

 

Related Articles