title: Random sample related data
body: <p>I'm working with a big postgres database.</p>
  
  <p>I would like to use a sample of the production data as test data in my development database.</p>
  
  <p>But, if I dump the production data, and randomly removes 90% of the data, I becomes very sparse. That is, the data in the tables are no longer as related as it used to be.</p>
  
  <p>What techniques can one apply in order to sample the database, while keeping data related?</p>