The first step in any plumbing installation is doing the job right the first time. All too often I have found dissimilar metals connected with out the use of a die-electric union.
The purpose of using a die-electric union is to keep two different metals from touching each other to prevent electrolysis.
Electrolysis simply stated is a chemical decomposition caused by the flow of electrical current between dissimilar metals. This means a tiny flow of electricity could exist between the metal surface of a tank and an attached drain valve or pipe nipple. Eventually a leak in a tank or at the threads of the fitting could a occur.
Lets take a look at a die-electric union and how it is built to prevent two metals from touching each other. See picture.
This die-electric union would be used with galvanized pipe and copper pipe.
The next two pictures show the die-electric union and its parts. There is a rubber washer ,and a plastic sleeve to separate the two metals. See picture.
Die-electric unions are not only used on hot and cold water lines but also on steam lines connecting black iron pipe to copper pipe. The difference is the gasket is made out of a different material depending on how hot the steam is.
You would always connect your water heater with die-electric unions because of the metal connecting the dip tube and the water supply. See picture.
The nipples coming out of the water heater will be either brass or galvanized depending on the brand of water heater. Some water heaters will not have the nipples installed and others won’t. If the water heater does not have the nipples all ready installed, I recommend brass nipples because the chance for electrolysis is lower.
There are many types of unions. See picture.
This is one style of union that can be soldered on copper and connected to copper. Although one end is brass, it is one style that is appropriate for copper to copper but not copper to any other metal other than brass.
Another choice to use to connect copper pipe to copper pipe. See picture.
Because the last two pictures of unions do not have a gasket or sleeve to separate two different metals you would not use these to prevent electrolysis.