title: MySQL Double way Foreign Keys?
body: <p>I was wondering if this kind of thing will work:</p>
  
  <p>Let's say I have two tables: COMPANIES and ADDRESSES. Each company can have only one address. Simplified schema would look like this.</p>
  
  <pre><code>COMPANIES
  id
  address_id
  name
  (...)
  
  ADDRESSES
  id
  first_name
  street
  (...)
  </code></pre>
  
  <p>Now, I want to add foreign key on <strong>COMPANIES.address_id -> ADDRESSES.id ON DELETE SET NULL ON UPDATE CASCADE</strong>.
  But I also want the address to be deleted when the company is deleted. So the other way around it would be <strong>ADDRESSES.id -> COMPANIES.address_id ON DELETE CASCADE</strong>. Is this safe and possible?</p>