Object Connections Management
Tables: VY_CONNECTION, VY_CONNECTIONTYPE
All connections between Vine objects are stored in the VY_CONNECTION table.
Types of connections are listed in the VY_CONNECTIONTYPE table.

Figure 9. How objects are connected
Example: The following SELECT will list all the companies who have got new employees during the last 30 days together with those employees:
select
c.realname, p.firstname || ' ' || p.lastname, p.title
from
vineyarddb.vy_company_view c,vineyarddb.vy_person_view p, vineyarddb.vy_connection_view con
where
c.status = 'B' and p.status = 'B' and con.status = 'B' and
p.id = con.targetobjectid and con.fromobjectid = c.id and
con.connectiontype = 1 and con.createdate > SYSDATE - 30
order by c.realname ;
Output:
AAC-Opisto OyBjörn AhlnäsMarketing director
Aaltosen Kenkätehdas OyBjörn AhlnäsMarketing director
Aarikka OyJyrki AhlroosManaging director
Aarikka OyJorma AarnioCustomer manager
All-Inductives OyMartti AaltonenMarketing director
Comments
0 comments
Please sign in to leave a comment.