Fix #2 and #4

Corresponding to composite primary key.
Add support for primary key without AUTO_INCREMENT.