Best practice for storing user info

Options

Hello -

I am trying to make an application using DraftBit as a frontend that allows a supervisor to have a list of subordinates under them. When they select a name from the list it will pull up a dossier of that person showing a list of all their pertinent information.

This information should be editable by the supervisor in the app.

I just need some very basic help with the structure of the database. Which data type should I be using to store the names?

How do I organize all the particulars about a person under their name? In the same table? Different referenced table?

I just need basic help to get traction on types and formats.

Once I get a good starting point I could probably figure out how to go from there.

Thank you!

Tagged:

Answers

  • Ray Deck
    Ray Deck Trusted Xano Expert ✭✭✭
    Options

    At a glance, I think you want a table of “dossiers” that is one per person. Each dossier has a “supervisor” field that is a table reference to your “users” table for the signing-in supervisor.

    That way you can authenticate access to that that table by checking dossiers.supervisor == auth:id or something along those lines.

    Data structure can be hard! Its a common topic on our daily State Change Pro office hours.