A
A
apptimeru2018-07-12 23:09:40
MySQL
apptimeru, 2018-07-12 23:09:40

How to properly design a database for notifications?

Hello everyone, how to correctly implement a table or tables for the notification system?
For example:
We have the following table of notifications (simplified):
1. user
2. type (table name in the database)
3. id_type (id in this table)
Notifications can be of a completely different plan, and information needs to be obtained to form them from different tables, like do it right? Not to do a pack of requests to different tables? The idea with left outer join also seems strange, in general I can’t figure out how best to store and then conveniently display?
Tell me exactly according to the logic of the whole chain, thank you in advance)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Rsa97, 2018-07-13
@Rsa97

If these are notifications of the "sent and forgotten" type, then, IMHO, generate notifications and store ready-made ones. For people in text form, for programs / services - in JSON / XML / serialization.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question