...and to chime in with Craig's info:
Here in California, new earthquake foundations and structural (the building's frames) are designed to withstand certain levels of tremors, depending on the size of the buildings. I hope someone in the geology and structural engineering areas can support me on this. I'm still a tad behind on the last study I've done:
Imagine the earthquake is not like a baking pan that gets shaken side-to-side. Rather, imaging the earthquake area is on a jello surface, that actually moves in a wave pattern (similar to the ocean's wave). The movement is actually up-and-down, as well as side-to-side movement at the same time. To minimize the damages:
Small houses/single story building:
1. The foundation has to be re-enforced with rebars as the special mixture of concrete is poured over them. This allows the concrete foundation to buckles and flexes with the 20 feet of very compacted amended soil during the rough grading processes (a process that the earth moving company performed to remove old soils and replace with better soils to prevent the building from sinking).
2. For the larger buildings, rather than 20 feet of amended soils, it may be up to 50 feet. On top of that, the foundation is re-enforced with rebars, and there are two (not one) foundations. The bottom foundation is used to move with the soil when there's an earthquake. In between foundations, there may be high tension spring coils/columns to minimize any movement of the bottom foundation to the building itself. Just like how your car is built. Wheels touch the ground and bounce with it. The springs and shocks attaching to the wheels prevent the bouncing-rattling-rolling movements from shaking you too badly so you can drink your sodas without spilling it.
You get my pictures?
There's a massive research on a city in Japan that can withstand up to a 9.0 earth quake. You heard me right. It's called the "Neo-Tokyo" project. That was my old researches based on, and studies of California Building Industrial Association engineered structures as well.