do i create a sepreate notification and user_notifications table in my database
I am working on a chat app using prisma and mysql here are some details my app it will include rooms where users can join like servers in discord you can add friends to the room , create your own room kinda like discord, i am currently in the phase of structuring my database , i am currently structuring the notifications , i am a bit struggling on how to go about my notifications structure in the database my chat app will have friend request notifications and other types of notifications i thought i can just create a table for notifications now what if there is a 100 users let's say 50 of them send friend requests to the other 50 i would have like 50 records or something in the notifications table , what if the room admin (owner) sends a friend request to all members of the room again we will have like x amount of records for each notification the admin sends to the users in the table i thought the notifcations should be sent to the
room_id
and the users that joined the room with that room id should have that notification but there is problem we still need to have records with the notification for these users do i have all these notifications records in one table or do I create a table for all notifications in the App and a sepreate one for user_notifications that will have the notifications for each users ?0 Replies