Kbase 16688: Database and Object alias in Roundtable
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  5/10/1998 |
|
Database and Object alias in Roundtable
This knowledgebase entry discusses the role of aliasing in Roundtable.
When managing database schemas through Roundtable, you may
create several alias names to refer to the same database.
This is equivalent to using the CREATE ALIAS statement in
the Progress 4gl. In Roundtable, this is achieved with the
following steps:
1. Select the database from the Roundtable TableTop.
2. Select the DBase tab.
3. Right-click anywhere in the DBase tab area to bring up
the pop-up menu.
4. Choose Aliases... and click on New to create the new alias
name for the database.
After updating the database schema, you may refer to the
alias in your 4gl code (i.e. FOR EACH myalias.customer:).
Object aliases in Roundtable are nearly the opposite of database
aliases. An object alias is used when more than one physical
file in the OS has the same name. In Roundtable, every object
within a workspace must have a unique name. However, this name
may be an alias for an object name which is used by several
different files within the workspace.
For example, say you have three different modules within your
workspace. Within each module you have an object called
object1.p. These are three separate objects which happen
to share the same name. While this is not recommended,
it is possible to handle this situation within Roundtable
using object aliasing. Note that this applies only to PCode
objects. This is not supported for DOC objects or schema objects.
To create an object alias:
1. First create object1.p in module 1.
2. In module 2, create a new object (File -> New Object).
3. Roundtable reserves the @ character to indicate object name
aliasing. Think of an alias name for your new object. It may
be @object1.p or any other name, such as @customer.p, as long
as it is preceded by @. Make sure you have selected the
correct subtype and choose OK.
4. You will be prompted by a screen which asks for Parts for
object @<objectname>.p. There is a fill-in asking for Relative
Path to Part. Here "relative" means relative to your workspace
directory. Fill in the name (or path and name if necessary)
of your second module. For instance: module2.
5. There is also a fill-in for Part Name. Here you will fill
in the physical object file name. In this example: object1.p.
(This assumes you are not using multiple-part subtypes. If you
are, you must fill in object names for each part.)
6. Repeat the process for module 3. Note however, if you have
chosen @object1.p to be the alias name in module2, you can not
use it again in module3. Each alias name must be unique. If
you try to do this, Roundtable will think that you want to move
the object that already has that name.
From Roundtable's perspective, you will now have three unique
object names - one in each module. For example: object1.p,
@object1.p, and @customer.p. If you look in the subdirectory
corresponding to each module in your OS, you will see three files,
each called object1.p.
Progress Software Technical Support Note # 16688