In the context of user account management, I'm using Firebase. So for each login, the front-end sends an Auth ID, a FCM token (for sending notifications to the user), and the usual user details. Each item goes on its own column. With a couple of uniqueness constraints it is all nice. Sometimes, the FCM token is different, so I need to check for that and update/insert accordingly.
Now, I need to extend the system so that the same user can login to the same account on multiple devices. And all the devices should get the notification.
So the auth ID and everything else remain the same but there will be different FCM tokens for each device. I can put all the different tokens in 1) an array, 2) a json object, 3) have a separate table for FCM tokens, 4) have multiple rows in the same table each with a different token.
Option 4 is (probably) obviously terrible.
Option 3 is probably good, but will involve multiple db calls.
Options 1 and 2 seem nice, and I'm inclining towards them but I don't know the full ramifications.
So any help to figure out the right design choice will be appreciated.
I'm using Postgresql 13.