Foreign Key Concept

Hi I have few questions that I need clarity with
Suppose I have User Table and Contact table.

So there would be an admin user who would have the option to add Contact which in term is also an user. I am creating mapping in Contact Table as
Admin >Type User >The one who adds the Contact Table (loggedinuser)
Contact> Type User List > The one he adds as contact

Should I do it like this or
Admin >>UniqueId of User
Contact>> Unique Id of User

In Bubble every new table you create creates a magic new data type that corresponds to that table.

So in your contact table you can add a user field as type USER and this will be constrained to be users.

1 Like

Same dilema here:
I have users (who login to the app) and clients(who can also should login to the app to see their data)
The best way to relate these tables would be creating a user data type in client table?

If so when a new client is created, a user data field should be filled too, so he can have access?

Thank you