Create slugs programmatically

You need to programmatically set the slug as you do so. An SQL trigger could do the trick. Don’t forget to mind duplicate slugs as you write it.

Else, instead of publishing using the database, write a php script that calls the WP API.