Multiple Database Access from Single App

Hello,
Is it possible to have single app have access to more than it’s own database?
I know I can create multiple apps based on single app’s database, but I want to know if I can manage all app’s database in single app?

For example, I create 5 apps for restaurants (they offer the app to their customers without login and with their own branding), now I want to have single app that restaurants can use (login) to manage their own database (orders, customers…etc).

With current way, I have to create different management app for each restaurant and that’s what I’m trying to avoid.

You can’t have an app be connected to multiple databases, but what you can do in your example is have all 6 apps share the same database. You could have a Restaurants collection and a Menus collection where each menu is related to a restaurant. You would also have a relationship between Users and Restaurants where a user could be related to a restaurant that the manage.

The in the admin app, you could show the user a list of the menus that belong to the restaurant that they manage.

1 Like

Hi Ben,

I have the same question of Dana. The thing is, I don’t understand how can I relate a collection with a restaurant in this case.

Could you explain me how to make it?

Thanks!

@Ben…share db is an awesome feature !!!

To make a relationship you will go to add property > relationship > choose the collection > determine association and then you will be able to have the two collections related.

The actual association of the collection to restaurants will depend upon the collection and what their interactions are.

I understood a Shared database is selected at App creation Time… so is it too late once the App has been created to modify it so as to link it to another App DB ?

That’s correct. It can only be done during app creation.

1 Like