User Guide : 6. Working with Databases : Working with Procedures, Sequences, Events, and Synonyms : Synonyms
 
Share this page                  
Synonyms
Synonyms are alternate names, or aliases, that can be created for tables, views, or indexes.
You can use synonyms to define shorthand names in place of long, fully qualified names. After you create a synonym, you can reference it in the same way as the object for which it was created. For instance, you can issue SELECT statements using the synonym name.
You can create or delete synonyms. You can also view their properties.
Synonym Dialog
The Synonym dialog contains the following pages:
General
Lets you specify a name for the synonym. Synonyms must following Object Naming Rules. Also lets you select the table, view, or index for which you will be creating the synonym.
For more information, see Create a Synonym.
Create a Synonym
Before you can create a synonym, the Actian database installation containing the database must be connected in the Instance Explorer (see Connect to an Actian Database Instance).
You create synonyms using the New Synonym dialog (see Synonym Dialog). You can open this dialog the following ways:
From the context menu of a database’s Synonyms folder or synonym node: New Synonym
On the main menu ribbon when the Synonyms folder or a synonym node is selected in the Instance Explorer: Database, Synonym, New Synonym (see Database Tab)
To create a synonym
1. Open the New Synonym dialog in one of the ways explained previously.
2. Enter a name for the synonym (see Object Naming Rules).
3. Select a Synonym Type: Table, View, or Index.
4. Select the table, view, or index from the list.
5. Click OK.
The synonym is created and stored in the Synonyms folder of the database.
Delete a Synonym
Before you can delete a synonym, the Actian database installation containing the database must be connected in the Instance Explorer (see Connect to an Actian Database Instance).
You delete synonyms using the Delete Synonym dialog. You can open this dialog the following ways:
From the context menu of an synonym node: Delete
On the main menu ribbon when a synonym node is selected in the Instance Explorer: Database, Synonym, Delete Synonym (see Database Tab)
To delete a synonym
1. Open the Delete Synonym dialog in one of the ways explained previously.
2. Click OK.
The synonym is removed from the Synonyms folder of the database.
Note:  If a deleted synonym is still used in query statements and code, these references will no longer work.
View Synonym Properties
Before you can view the properties of a synonym, the Actian database installation containing the database must be connected in the Instance Explorer (see Connect to an Actian Database Instance).
You view event properties using the Synonym Properties dialog. You can open this dialog the following ways:
From the context menu of a synonym node: Properties
On the main menu ribbon when a synonym node is selected in the Instance Explorer: Database, Synonym, Synonym Properties (see Database Tab)
To view the properties of a synonym
1. Open the Synonym Properties dialog in one of the ways explained previously.
The names and owners of the synonym are displayed.
2. Click individual properties to display their descriptions at the bottom of the dialog.
3. Click OK to close the dialog.