This is an automated archive.
The original was posted on /r/golang by /u/GolangAddiction on 2023-09-01 15:54:33+00:00.
I’m currently debating where to use a sql or nosql database I’m currently thinking both
Sql database to store UserID, Username, Email, Password, Bio, Avatar, Verified
Verified is for the magic link to log if the user is verified the email or not
what I will use the nosql database
UserID, Following, Followers
the userid will be used for searching and then Following and followers will be an array of user ids with a value of Username and Avatar
example of Following in json
{
"UserID": 123,
"Following": [
{
"UserID": 456,
"Username": "following\_user1",
"Avatar": "following\_user1\_avatar.jpg"
},
{
"UserID": 789,
"Username": "following\_user2",
"Avatar": "following\_user2\_avatar.jpg"
}
],
"Followers": [
{
"UserID": 987,
"Username": "follower\_user1",
"Avatar": "follower\_user1\_avatar.jpg"
},
{
"UserID": 654,
"Username": "follower\_user2",
"Avatar": "follower\_user2\_avatar.jpg"
}
]
}
is this good or no what could I could I impove
You must log in or register to comment.