How to make that each user has own table in Supabase

Hello, I’m new in no-code and I’m making a Human Resources web app. In one of the parts of the app the idea is to make a kind of form where people con enter information from someone in order for it to appear in another page with all the other answers of the form.
The issue is that I don’t know how to make it happen since I don’t want that all the information from all users get’s combine in the same table in my backend.
I don’t know what is the right thing to do; to automate the creation of a new table for each new use, or is there any other more convenient way to make it. I’m working with Supabase as my backend.
Thanks

I think you should revisit how relational DBs like Supabase has works. It is supposed to be one table for everyone. With one row for each person.

1 Like

In supabase you already have a table with all your users inside. In your form table you will have every data entered by your users but they will have an additional column linking to the belonged user.

On this table you will add a RLS (a policy) that will enforce the fact an user can only see the data which belong to him. That’s how it works.

So when your users will fetch all the data from the table he will be able to get only the data where his ID is equal to the information inside the user column from the Form table.

3 Likes

Thanks!

If you’re new to nocode, it’s better to avoid Supabase because it requires plenty of tech skills to work properly.

The SQL database means that you have one table for users, another for clients, another for meetings and so on. In each table you have properties that connect your table entries. So if you have some Mark, which has 4 candidates, all candidates should be in one table, but Mark’s candidates have “Manager” column set to “Mark” as a foreign key.

If you use Supabase, it will be the easiest part. And by the way, you need to write a code and understand SQL programming language to set system rights for every table.

I’ll recommend you to try out Airtable and Glide first, because WeWeb is more like a rocket science for the beginners. And then, when you’re familiar with databases and relations, go through WeWeb Academy.

In my humble opinion, WeWeb is one of the best solutions now, but it isn’t easy.

I would highly recommend building a prototype in something like Coda to start understanding how to structure a database. Starting in Supabase to learn how to structure a database will be a bit painful

1 Like