What is the best approach for handling members?
In my application ill have teams and each team will have multiple projects, chats, etc... ANd I want to handle members. For the teams I have a team table and a teamMembers table (where I track members and roles). What about the projects and chats inside the team (ill have public ones -> Everyone is member, and then private ones -> the admin assigns who is a member there), so I don't know if I should store this chat/project members as an array of ids inside the project/chat table or also have separate tables for this. Thanks for your time
4 Replies
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!
Separate tables sounds good to me. Have you used SQL databases before? Intuition from those carries over well, join tables are generally preferred to arrays of IDs.
This might be helpful: https://stack.convex.dev/relationship-structures-let-s-talk-about-schemas
Relationship Structures: Let's Talk About Schemas
In this post we’ll look at some patterns for structuring relationships in the Convex database.
Thanks @ballingt !
I have used but never for a "Big project", I have been using NoSQL for my last projects.