i am trying to think of a database for a project similar to netflix. where you can login on multiple devices and for each device you have a token.
the problem is that i cannot think of a structure of a relational database for that.
i created it on mongodb and my structure was like that:
{
user: 'name',
etc...
tokens: [{
token: 'asdasijdoaisjd',
token: 'sodjio2n'
}]
}
so yeah... everytime a user logins in a new token gets added to the db and when he logs out from one place, one token gets deleted.
how can i create something similar in a relational database?