title: Composite key as foreign key (sql)
body: <p>here are my two tables of concern:</p>
  
  <pre><code>CREATE TABLE IF NOT EXISTS `tutorial` (
    `beggingTime` time NOT NULL,
    `day` varchar(8) NOT NULL,
    `tutorId` int(3) NOT NULL,
    `maxMembers` int(2) NOT NULL,
    `minMembers` int(1) NOT NULL,
    PRIMARY KEY (`beggingTime`,`day`,`tutorId`),
    KEY `tutorId` (`tutorId`)
  ) 
  
  
  CREATE TABLE IF NOT EXISTS `group` (
    `groupId` tinyint(3) NOT NULL AUTO_INCREMENT,
    `status` varchar(20) NOT NULL,
    `groupName` varchar(50) NOT NULL,
    PRIMARY KEY (`groupId`)
  ) 
  </code></pre>
  
  <p>I would like to create a field in 'group' that would link to the composite unique keys in 'tutorial'. So I guess my question is, how do I relate these tables? do I have to to create foreign keys field in 'group' for each primary key in 'tutorial'?</p>