User guide

Metadata modeling
78 Data Integration with Sybase Avaki Studio
About metadata models
In Avaki Studio, a metadata model expresses a schema. Metadata models define a set
of tables in which each table contains a set of named columns and each column is
associated with a data type. A table in a metadata model can be mapped (linked) to an
Avaki object, such as a data service or a database operation, or to a table in a database.
When the metadata model is deployed, the mapping lets you call each mapped object
by the name of the corresponding table in the metadata model. (Tables in the model
have no relationships to one another.)
You can also derive a view model schema from a metadata model, which means ensur-
ing that the results of any data service deployed from the view model conform to the
metadata model.
There are two ways to obtain a metadata model:
Import a file into Avaki Studio from a data modeling tool such as Sybase PowerDe-
signer or ERwin. For instructions, see “Importing metadata models” on page 79.
Create a metadata model in Avaki Studio by specifying tables, columns, and data
types. For instructions, see “Creating and editing metadata models” on page 85.
Metadata modeling in Avaki has two important benefits:
You have easier access to Avaki objects like data services. When you map a
metadata model to an Avaki object, you can access the object using the metadata
model’s name, which may be the same as the name of the database table from which it
was created. For example, suppose you have a Crystal Reports application that
accesses a table called HumanResources.Employee in a relational database. You are
building an Avaki data service, emp.DS, that selects and transforms data from the
HumanResources.Employee table, and you would like to make it simple to point the
CR application at either the real database or the Avaki data service for its data.
Solution: Import the schema for HumanResources.Employee into Avaki Studio as a
metadata model. You now have a model called HumanResources, which contains a
table called Employee. Next, map the Employee table in the HumanResources meta-
data model to your emp.DS data service. This mapping lets you access the emp.DS
data service as HumanResources.Employee—the same name you use to access the
table in the database. You can point your application at either the database or Avaki; no
further changes are required.