This is what I understood from your comment.
You are displaying treeview of menus and submenus with check boxses and you want to save values for selected check boxses for that particular user.
In this case, you can store data in comma separated format.
And while fetching that data use split function at the back end.
For split function, may this LINK
will help you.
All The Best!