itslekanI
Convex Community14mo ago
12 replies
itslekan

Database Structure Help

Hey I need a little help trying to structure my database. I'm making a tenant management app. There are multiple managers and each manager can create multiple properties and add one tenant per property. There is a page that allows the manager to view all his tenants but for that to work I need to get all their properties and then get all the tenants under each property

It feels really tedieous and I was wondering if there is a smarter more proper way to do this

I feel like the tenant should also have a manager_id field but I don't know if that's how it should be done

The tree normally looks like manager -> property -> tenant but now it's make it

manager-> property -> tenant

but also manager -> tenant
Was this page helpful?