title: mongoDB alternatives for foreign key constraints
body: <p>I have created a SQL DB and examined the integrity. Now I wanted to put these tables in mongoDB, and I've kept it in the mapping rules. Table = collection, row = doc, and so on.</p>
  
  <p>But how does one set about following in mongoDB:</p>
  
  <pre><code>create table pruefen 
  ( MatrNr integer references Studenten on delete cascade,
    VorlNr integer references Vorlesungen,  
    PersNr integer references Professoren on delete set null,  
    Note numeric(2,1) check (Note between 0.7 and 5.0),   
    primary key (MatrNr, VorlNr));
  </code></pre>
  
  <p>DBRef, I've tried but is not a foreign key replacement.<p></p>
  And if the application is to take over as it would look then?</p>