Hi Team,
What data type should be used if I want to store the data like this
id,users
1, user1
2, user1; {user2,user3}
3, user1; {user2,user3}; user4
Operations:
We can remove the users from list
input: id, username -> 2,user1
output: 2,{user2, user3}
input: id, username -> 3,user3
output: 3, user1; {user2}; user4
Discussion posts and replies are publicly visible
Are you talking about storing the data to database? If yes, a single field cannot store multiple values. A basic data structure could be
primary_key, id, user
And the data
1, 2, user1
2, 2, user2
3, 2, user4
4,42, user8