|
|
|
The COALESCE operation
extracts and coalesces the value of a property that
is distributed over a number of individual paths.
Syntax
The general form of a COALESCE is given below.
COALESCE(property, variable)
The COALESCE operation
extracts and coalesces the value of the property for the
set of paths that connect two nodes in
the (collapsed) paths represented by the variable.
The paths are implicitly collapsed prior to evaluating the COALESCE
if the user forgets to explicitly collapse the path.
Extracting the TRANSACTION TIME
Let's start with a simple example to extract the transaction time
all the 'movie' edges to a star name.
| Get movie stars and their transaction times.:
The interesting feature about the result is that
the Bruce Willis node appears twice.
This is because there are two paths
to that node, and each has a different transaction time.
(Bruce Wilis, note the spelling, also appears once).
|
Coalescing the TRANSACTION TIME
Coalescing computes the transaction time over all possible paths.
Let's do the same query as above, except this time we will coalesce the
transaction time rather than just extracting it.
| Tell me about movie stars and their transaction times.:
The result illustrates the difference between the
coalesced transaction time and the extracted transaction time.
|
Coalescing other properties
Any property can be coalesced.
| The coalesced names, security, and transaction time of all nodes.:
|
Curtis E. Dyreson,
Michael H. Böhlen, and
Christian S. Jensen
© 1998-2000. All rights reserved.
|