Hi,
Bgp deterministic-med command ensures the comparison of the MED variable when choosing routes advertised by different peers in the same autonomous system and bgp always-compare-med command ensures the comparison of the MED for paths from neighbors in different autonomous systems.
But there is a way and sequence of comparison depending if both are enabled or either one is enabled. Please follow the link below that will help you understanding the MED comparison.
http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094925.shtml
If you have any BGP query you can refer to my ask the expert event link:
https://supportforums.cisco.com/discussion/11945706/configuring-and-troubleshooting-border-gateway-protocol-bgp
Thanks & Regards
Sandeep