Short Answer
All exposed metal should be "grounded" by connecting it to a properly designed low impedance ground circuit in order to ...
Stop fault energy flowing into YOU or to other unintended places. The grounded metal will provide a much lower impedance than you will. Earth potential rise should be lower to much than phase voltage and you should at worst feel a reduced shock for a very short period.
Assist fault detection & interuption equipment to work properly (or at all). [eg fuses, circuit breakers, ground fault interrupters/earth leak circuit breakers etc.] A large amount of current, greatly in excess of the usual design maximum, will glow from "phase" to ground and cause the fuse or circuit breaker to interrupt the voltage.
If an eath leak circuit breaker / ground fault interrupter is used - allow nearly complete protection against electric shock.
Long(er) Answer:
The main objects in power distribution to "appliances" (let's use that to refer to everything from large fixed wired things to small portable devices) are
(1) To make the energy go to where we want it
(2) To stop the energy going where we don't want it.
(3) To detect when energy goes where it shouldn't and stop it doing so
(4) To maximise efficiency of energy transfer.
(5) To keep users safe and surroundings free from damage.
5 is arguably a mixture of 2 & 3.
The interconnection and "earthing" of all exposed metals is related to 2 & 3 & 5
Point 2 - Stop it going elsewhere: We don't want energy to leave the appliance - eg into users, into other equipment, into the ground (except a temporarily as part of ensuring 3 & 5. If there is a path to ground via a ground lead from a broken mains wire, or via failed insulation or an incorrectly operated switch etc then the energy cannot get out into the world.
If fault energy flows into a case and then to ground via a low-impedance-by-design via ground lead oath, then it is very unlikely to flow through you. This is usually regarded as 'a good thing' [tm].
Fault energy flows into the case or chassis and then via the ground wire to ground, thereby completing the circuit. What happens then is covered by point 3.
Point 3 - detect and stop fault energy flow. Energy flowing via a ground lead is not meant to be there. An AC mains or "grid" feed to an appliance is designed to be able to provide far more current than it is intended or designed to handle. This is so that the voltage drop will be low under normal use conditions. Ground circuits are also designed to be able to handle in the sort term far more current than the mains circuit is designed to provide. So during a phase (= live wire) to ground or to chassis or to metal case fault, the current flow via phase and back via ground will be far larger than it is designed to be in bnormal use. This means that the fault condition is easily distinguised from normal operation - so that objects with no more brains or capability than a piece of wire - commonly termed a "fuse" - can detect and terminate the flow.
Visitors have arrived .... more soon ...
This is a very complex issue, since it deals with EMI/RFI, ESD, and safety stuff. As you've noticed, there are many ways do handle chassis and digital grounds-- everybody has an opinion and everybody thinks that the other people are wrong. Just so you know, they are all wrong and I'm right. Honest! :)
I've done it several ways, but the way that seems to work best for me is the same way that PC motherboards do it. Every mounting hole on the PCB connects signal gnd (a.k.a. digital ground) directly to the metal chassis through a screw and metal stand-off.
For connectors with a shield, that shield is connected to the metal chassis through as short of a connection as possible. Ideally the connector shield would be touching the chassis, otherwise there would be a mounting screw on the PCB as close to the connector as possible. The idea here is that any noise or static discharge would stay on the shield/chassis and never make it inside the box or onto the PCB. Sometimes that's not possible, so if it does make it to the PCB you want to get it off of the PCB as quickly as possible.
Let me make this clear: For a PCB with connectors, signal GND is connected to the metal case using mounting holes. Chassis GND is connected to the metal case using mounting holes. Chassis GND and Signal GND are NOT connected together on the PCB, but instead use the metal case for that connection.
The metal chassis is then eventually connected to the GND pin on the 3-prong AC power connector, NOT the neutral pin. There are more safety issues when we're talking about 2-prong AC power connectors-- and you'll have to look those up as I'm not as well versed in those regulations/laws.
Tie them together at a single point with a 0 Ohm resistor near the power supply
Don't do that. Doing this would assure that any noise on the cable has to travel THROUGH your circuit to get to GND. This could disrupt your circuit. The reason for the 0-Ohm resistor is because this doesn't always work and having the resistor there gives you an easy way to remove the connection or replace the resistor with a cap.
Tie them together with a single 0.01uF/2kV capacitor at near the power supply
Don't do that. This is a variation of the 0-ohm resistor thing. Same idea, but the thought is that the cap will allow AC signals to pass but not DC. Seems silly to me, as you want DC (or at least 60 Hz) signals to pass so that the circuit breaker will pop if there was a bad failure.
Tie them together with a 1M resistor and a 0.1uF capacitor in parallel
Don't do that. The problem with the previous "solution" is that the chassis is now floating, relative to GND, and could collect a charge enough to cause minor issues. The 1M ohm resistor is supposed to prevent that. Otherwise this is identical to the previous solution.
Short them together with a 0 Ohm resistor and a 0.1uF capacitor in parallel
Don't do that. If there is a 0 Ohm resistor, why bother with the cap? This is just a variation on the others, but with more things on the PCB to allow you to change things up until it works.
Tie them together with multiple 0.01uF capacitors in parallel near the I/O
Closer. Near the I/O is better than near the power connector, as noise wouldn't travel through the circuit. Multiple caps are used to reduce the impedance and to connect things where it counts. But this is not as good as what I do.
Short them together directly via the mounting holes on the PCB
As mentioned, I like this approach. Very low impedance, everywhere.
Tie them together with capacitors between digital GND and the mounting holes
Not as good as just shorting them together, since the impedance is higher and you're blocking DC.
Tie them together via multiple low inductance connections near the I/O connectors
Variations on the same thing. Might as well call the "multiple low inductance connections" things like "ground planes" and "mounting holes"
Leave them totally isolated (not connected together anywhere)
This is basically what is done when you don't have a metal chassis (like, an all plastic enclosure). This gets tricky and requires careful circuit design and PCB layout to do right, and still pass all EMI regulatory testing. It can be done, but as I said, it's tricky.
Best Answer
Typically mains ground is your best bet, assuming that the connection to ground is good (in the building) and the wiring in the building is good, it's as good as you can get. A ferrite on ground will actually give you more problems, because any impedance that restricts current on the mains ground will create a voltage on the ground plane.
Make sure the connection between ground and the PCB ground is low impedance (that means low resistance) to prevent common mode voltages.
No, in all commercial products with no isolation, the ground is ground and should be for safety reasons.
A properly designed board does not need separation between AGND and DGND. It's about managing currents on the PCB. Currents create voltages through the ground plane. Currents usually arise from bad placement of connectors that are carrying currents or shield currents (shield currents should more often then not directed to chassis ground).
A properly designed board does not have switching return currents running through the analog section (the currents from the GND pin of an IC will return to ground, usually through the shortest distance, and will create voltages in conjunction with the resistance of the ground plane. So place components with large or switching return currents away from sensitive analog components.
Another source of currents is EMI capacitivly coupling with the PCB, and returning to ground in which proper shielding would take care of that problem.