how to refer to data of referenced node
In drupal 6, the standard way of doing this is by using the following function:

node_load($nid = NULL, $vid = NULL, $reset = FALSE)


However if you want to implement it in Drupal 7, it becomes a lot easier using the Views and the References module. All you need to do is :


Create two different content types say a and b and add fields to them. You MUST add a node reference field(say to b)
A pop up would ask you to choose which node you would like to reference(choose a here)
After that if you wish to look for some advanced settings, you can add Relationships depending on your requirement.