Linking object position to another object Let's say I have an model with 3 objects. In this case, the head, body and base of the lamp. 

Is it possible to add some kind of constraint to the head object so that the head moves with the top of the body object. For example when I scale the body on the z axis the head moves along the z axis to always stay on top?

Something like copy location constraint but to account for scale of target object.
If I got it, you can parent the head to some top vertices of the scaled object, like this




first, set the origin of the scaled object to its base face





then select just the top face of the same object



 - then in object mode select the head and after also select the body




then parent and set parent to "vertex"




now, when you scale the body on Z, it will be based on its base, so the top face will move, and the head will follow, as shown above.

here is a test (simplified) file to test