Trends Logic in DB
Drivers ODBC
JDBC
OLE DB
.NET
Podcast SQL:2003
MS SQL 2005
Webcast
SQL:2003
MS SQL 2005
|
|
<<Prev 1 2 3 4 5 6 7 Next >>
Reshaping Example
Let's use the Department, Employee, Project hierarchical structure again for an example of a Reshaping operation. If the Project node contains no foreign key to be rejoined under the Employee node, it can still be Reshaped by following the semantics of the data structure. This is because every node in a structure is related to every other node in an unambiguous way. This can be and is usually a nonlinear path. For the Project node to be linked under the Employee node its path must be followed from the Employee node of the lower level structure copy. This would take it from the Employee node through the Department node to the Project node to produce the correct results based on the current semantics. This semantics can be seen below in the Reshaping operation where the Employee node goes through the Department node to get to the Project node (Employee => Department => Project). Since this use of the Department node is only for navigation, it is not included in the result. This path to the Project node data already exists in memory (either in rowset or node set form) and does not require further database access or navigation.
In the target structure shown in Figure 2, Project node under the Employee node consists of all projects belonging to the employee’s Department as in the source structure. This is because it maintains its original semantics and data and this answer is correct for a Reshaping operation since it retains the same semantics and values. This can produce results very different than Restructuring.
Enlarge
Fast, reliable data access for ODBC, JDBC, ADO.NET and XML
|
Note that in Figure 2 the Department and Employee nodes were already correctly positioned and related. This allows them to remain together with their relationship preserved. This saves having to use an additional structure level to join these nodes. But most importantly, notice that the synchronization between the upper and lower structure copy to retrieve the Project node is made using a unique value from the Employee node. This because the Department and Employee node relationship is already satisfied, and now the Employee over Project node relationship needs to be physically constructed. To do this, the upper structure must be synchronized with the lower structure at the current target structure construction point, which is the Employee node.
|
<<Prev 1 2 3 4 5 6 7 Next >>
Database Server Watch SQL Summit Home Page Articles
© 2007, Ken North Computing LLC, All rights reserved.
|
|
|