We have a java backend application which stores events in a mysql database. The frontend…
- User
We have a java backend application which stores events in a mysql database. The frontend can get a list of events via a REST API. Now we want to implement recurring events. e.g. daily or weekly events. What is the best way to do it. Can you recommend a data schema and maybe some standards or libraries?
Assistant
I’m happy to help with this! One way to implement this is to use a data schema that includes a “recurring_event_id” field, so you can identify the recurring event and its instances. Then you can use the “recurring_event_id” field in your queries to get all the instances of the recurring event. You can also use some kind of scheduling library to implement the recurring events, so you don’t have to write the scheduling logic yourself. The scheduling library will make it easy to get the instances of the recurring event.
- User
scheduling is not part of our use case. We just have to be able to return in the API response all the recurrence instances for a given time frame.
Assistant
I’m happy to help with this! One way to implement this is to use a data schema that includes a “recurring_event_id” field, so you can identify the recurring event and its instances. Then you can use the “recurring_event_id” field in your queries to get all the instances of the recurring event. You can also use some kind of scheduling library to implement the recurring events, so you don’t have to write the scheduling logic yourself. The scheduling library will make it easy to get the instances of the recurring event.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.