title: SQL delete query with foreign key constraint
body: <p>I know that this question belongs to the very early stages of the database theory, but I have not encountered such a problem since several months. If someone has a database with some tables associated together as "chain" with foreign keys and they want to delete a record from a table which has some "dependent" tables, what obstacles arise? In particular, in a database with tables: Person, Profile, Preference, Filter exist the associations as <code>Person.id</code> is foreign key in <code>Profile</code> and <code>Profile.id</code> is foreign key in <code>Preference</code> and <code>Filter.id</code> is foreign key in <code>Preference</code>, so as that all the associations<code>enter code here</code> are <code>OneToMany</code>. Is it possible to delete a Person with a simple query:</p>
  
  <pre><code>Delete from Person p where p.id= 34;
  </code></pre>
  
  <p>If no, how should look like the query in order to perform the delete successfully? 
  If the database in the application is managed by hibernate, what constraints (<code>annotations</code>) should I apply to the associated fields of each entity, so as to be able with the above simple query to perform the delete?       </p>