title: Select rows with "one of each" in relational algebra
body: <p>Say I have a <code>Persons</code>table with attributes <code>{name, pet}</code>. How do I select the names of people where they have one of each kind of pet <code>(dog, cat, bird)</code>, but a person only has one of each kind of pet if they pet is in the table. </p>
  
  <p>Example: <code>Bob, Dog</code> and <code>Bob, Cat</code> are the only rows in the table. Therefore, <code>Bob</code> has one of each kind of pet. But the moment <code>Lynda, Bird</code> are added, <code>Bob</code> doesn't have one of each type of pet anymore. </p>
  
  <p>I think the first step to this is to <code>π(pet)</code>. You get a list of all kinds of pets since relational algebra removes duplicates.  Not sure what to do after this, but I have think I need to join <code>π(pet)</code> and <code>Persons</code>.</p>
  
  <p>I've tried a few things like Natural Join and Cross products but I haven't arrived at a result yet and I'm out of ideas.</p>