Hai presente i concetti di AUTO_INCREMENT e PRIMARY KEY ?