User guide

Creating view models
30 Data Integration with Sybase Avaki Studio
The exercise
In this tutorial, we’ll create a data service for the human resources department of a
large organization. The HR coordinators who answer employees’ questions about com-
pensation, benefits, and transfers need quick access to information about each person
they talk to, and the information is located in two different relational databases. We’ll
use Avaki Studio to set up the required Avaki database operations, construct and test a
view model, and deploy the view model as a data service. An HR application accepts
data from the data service and displays it.
This illustration shows the components involved in the workflow.
The HR data service
Given the name of an employee, the data service must return a result set with the fol-
lowing columns:
DEPTNO: The employee’s department number
DNAME: The employee’s department name
LOC: The location at which the employee works
NameNumberJob: The employee’s name, employee number and job title
MGR: The name of the employee’s manager
Department
database
Employee
database
dept_db
emp_db
getAllDepts
select *
from dept
getEmpGiven
select *
from emp
Name
where
ENAME = ?
Database
connector
Database
operation
View model
deployed as
HR application
file
A
file
B
file
C
Result
D# DNAM LOC
422 Acct Bos
a data service