there are a million different thoughts on that subject. I prefer DSB (deep sand bed) 4+ inches with super fine Oolitic sand at the bottom making for a perfect base base that anaerobicly breaks down nitrate so you end up with almost no nitrates ever. this of course relys on you maintaining a proper crew for sand bed maintinence.
I prefer to go DSB as well, the benefits are higher. Althoug there is the option of shallow sandbed which should be anywhere from <1"-2" at the most. But just like stated before "the shallower the bed the finer the grain size" should be.
I also prefer a deeper sand bed, but you will need some good cleaners. I did not know that when I started and my sand ended up getting a major build up of brown algee. Someone on the board told me to get a good sand sifting goby to help with the algee and some snails, just to keep that in mind.