Tenancy Management DB Help!

Hey there,

I’m currently making an app where the user can keep a chronological record of their previous tenancies, looking for the best way to structure the database.

Essentially, the user will have their current tenancy, and will be able to add their previous and next tenancy.

How would one set this up to be structurally the best?

Aim: To allow the user to retrieve the data related to the selected tenancy and edit then and add in their upcoming tenancy where they can mange different data points but then also archive this when they move properties?

Currently: I had set this up under the user in the database, with the relevant columns for their current and previous tenancy. This is great for the archive of two properties, but over-time they will need more than just this?

Thanks :slight_smile:

Hi there, @ballan… if it was my app, I wouldn’t put the tenancy fields on the User data type for plenty of reasons. Instead (and without knowing more about your app), I would likely create a Tenancy data type that has all of the relevant fields, potentially including one or more yes/no fields to designate a current property vs. a future property vs. an archived property… although, you could probably determine that information based on the dates associated with a particular tenancy.

Anyway, with a Tenancy data type, you can easily get all of a specific user’s information with a search for tenancies created by the current user. You could also keep a list of a user’s tenancies in a field on the User data type for easy retrieval, too, but it may not really matter one way or the other.

Hope this helps.


1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.