How to insert different rows in multiple tables?

I want to modify the create request for one of my collection type, so that it will not only create a row in the table for that collection type, but also another new row in a different table for another collection type.
Can this be done?

How I want to use it:
API receives create request for the my collection type “category”, which is then created in the DB. With the same request 365 of my other collection type “day” should also be created automatically in its own table on the DB. (“category” and “day” collection types have a one-to-many relation.)