If a team can only be in one dept, then have a for...
# sql
g
If a team can only be in one dept, then have a foreign key in you team table pointing to a dept. then to access the team you check if users team array is the team row id , or his dept array is the foreign key to dept. in the row. So only need team table for both and then the user info in a table and/or part of the users meta data that comes in with the jwt.