I did some research and tried to create the tables with phpMyAdmin. For some reason, the primary key in the mtg_pin_identifier table does not reflect doc_id or pin_id. Is this still correct? Here's what I've go so far:
CREATE TABLE `mtg_doc` (
`doc_id` tinyint(4) NOT NULL auto_increment,
`doc` int(11) NOT NULL,
PRIMARY KEY (`doc_id`)
) TYPE=InnoDB AUTO_INCREMENT=1 ;
CREATE TABLE `mtg_pin` (
`pin_id` tinyint(4) NOT NULL auto_increment,
`pin` text NOT NULL,
PRIMARY KEY (`pin_id`)
) TYPE=InnoDB AUTO_INCREMENT=1 ;
CREATE TABLE `mtg_pin_identifier` (
`identifier_id` tinyint(4) NOT NULL auto_increment,
`doc_id` tinyint(4) NOT NULL,
`pin_id` tinyint(4) NOT NULL,
PRIMARY KEY (`identifier_id`),
FOREIGN KEY (`doc_id`) REFERENCES `mtg_doc` (`doc_id`)
ON DELETE CASCADE
ON UPDATE CASCADE,
FOREIGN KEY (`pin_id`) REFERENCES `mtg_pin` (`pin_id`)
ON DELETE CASCADE
ON UPDATE CASCADE
) TYPE=InnoDB AUTO_INCREMENT=1 ;
If this structure is correct, disregarding the number of integers, how do I insert data into this thing from a small test file?