Added foreign keys and composite key to composite table