See Document Design Tutorial.