title: Alternative of Foreign Key in RDBMS
body: <p>I am studying database course now, and I know a foreign key is the primary key of other table. But I am curious about the presentation of relationship: if we don't use foreign key to link with other table, but use a function to map a primary key of a record from a table to another one, does it work? I think it works in theory, but I am not sure is good idea in reality. Is it reasonable?</p>
  
  <p>P.S.
  because I think a table is a set, a function is mapping method from a set to another.</p>
  
  <p>Thanks in advance, 
  Sincerely.</p>