IMHO, unplugging a desktop computer before working on it is a bad idea. With
the computer turned off, the only live voltage floating around inside the case
is the low-current power switch sense line. When you unplug the computer, you
are using your ground, and the computer is more sensitive to static buildup. I
also recommend wearing an anti-static wrist strap grounded to the computer
chassis whenever working inside the box.
Most IDE hard drives are now operated with the drive jumpers set for cable
select, so master/slave status is determined by where the drive sits on the IDE
cable. I don't know about the jumper settings on SATA drives.