I've the next (simplified) architecture during my DB, and model classes that match the tables:
Notifications table: <notification_id>,<business_id>,<sending_date>,<content> Business table: <business_id> Clients table: <client_id>,<business_id>
Each client goes to some business, and companies send notices to clients. Notices are business-specific (the reason they've
<business_id>) and therefore are sent on the specified date. Presently when I have to send a notification I retrieve all of the clients owed to that particular business in the Clients table and send it for them.
Now I have to implement delivering notices per-client every certain period of time (e.g. send to Client A each month). There might be several notification per client. What will be the best design for your?
I am considering creating the next table:
I suppose it's some kind of a join consider I am a newcomer with databases I am unsure how to get it done in the easiest way. Also, if you will find any special ideas about how exactly the look means classes I'd be happy to listen to them.
I am using MySQL and Hibernate whether it matters.