Database management question

Options

Hello beautiful people,

I am in need of help :) . The context is this: i am trying to build an app, using bravo studio front end and xano as back end. The app is basically like a journal, where the user can input miracles that happened to him that day(in text). Each user will have to create an account.

The app will have a private section, and a community space where the user can see what other people shared. When the user inputs the data, there will be a checkbox “share it with others” which will cause the input he created to be posted in the community space.

Now, here comes the question. I'm not sure how to manage the databases. I see 2 options:

  1. Have 1 shared database for all users. That means, when an user creates an entry, it goes into this database, and then I can(hopefully) use filters to retrieve the personal information for each user. I'm not comfortable with this solution, not sure why.
  2. Second solution that I see is to create 1 database for the community space, where all the shared data will be stored, so that it can then be displayed in the app. And additionally, each user to have his own database with the information he inputted. So, here comes the question. Is it possible to program Xano to create a database for each new user the app receives? If yes, how should I go about it?

Thanks for reading! If you see any other solution that would be better, I am open to ideas!

Have a good one!

Answers

  • tomas_riegos
    Options

    Way easier and feasible to go with option 1. No reason to do the latter.

  • MattLaro
    MattLaro Member ✭✭
    edited March 2023
    Options

    If you're using a database, I'd say you have to go with 1.

    I understand your concern, as in you probably see databases as some kind of computer file where, seperated, it is impossible for the data from one database to be seens by the other, as they are not connected.

    However, databases is, as its name implies, a large central pool of data that is shared by many processes and people. The backend heavily gates access to that pool of data. It is then up to you to build your gates around that data.

    If your data entry is only accessible to authentified users, that you have NO public endpoints giving access to that data, and that your authentified users has only access to journal entries linked to it's user OR journal entries that are “checked” to be public, then there should be very little to worry about.

    Options 2. is very ressource unfriendly, probably hardly feasable in Xano and not a good usage of a database.

  • IAMLIT
    IAMLIT Member
    Options

    Thank you guys! I will do this

    Hello guys! Thanks a lot for your feedback. It does make sense to go with 1 database and I will go with this solution.

    Have a nice day!