Partition Functions and Thermodynamic Relations