title: Translating relational model to SQL code(Quick)
body: <p><strong>Question:</strong></p>
  
  <p>The relational model says dramatist_no OR A_no can be a primary key for this table. I believe my SQL code is correct but instead defines the attributes PK(dramatist_no, A_no) to be both PK. Would my SQL code be correct or do I have to change something regarding dramatist_no, A_no ?</p>
  
  <p><strong>Relational Model:</strong></p>
  
  <p>ACTOR_DRAM(dramatist_no, A_no)</p>
  
  <p>PK(dramatist_no) or PK(A_no)</p>
  
  <p>FK(dramatist_no) references DRAMATIST(dramatist_no)</p>
  
  <p>FK(A_no) references Actor_Born_Lives(A_NO)</p>
  
  <p><strong>SQL Code:</strong></p>
  
  <pre><code>create table ACTOR_DRAM ( \
  
     dramatist_no integer NOT NULL, \
     A_no integer NOT NULL, \
     constraint fk_dramatist_no \
     foreign key(dramatist_no) \
     references DRAMATIST(dramatist_no) \
     on delete restrict, \
     constraint fk_A_no \
     foreign key(A_no) \
     references Actor_Born_Lives(A_NO) \
     on delete restrict, \
     primary key(dramatist_no, A_no) )
  </code></pre>