Page 1 of 1

One Database for Multiple Apps Strategy?

Posted: Thu Jan 22, 2015 7:57 am
by Gabriel

Hi,

I used to program years ago and have taken it back up recently so I'm sorry if this question is very basic. I'm new to Appery and training here with my first App.

I wanted to create multiple apps. Some of my users might download more then one of them. Given many of my users may have a strong interest to use several of these apps which are somewhat related, I was wondering about the following: instead of having the users who download more then one, create multiple login/password accounts, I'd rather they just use one username/password. I'm assuming to do this I'd create one database for the multiple apps so they have the same shared users collection?

Is there any down side to this strategy? Is there anything I should consider in making this decision? Is there any reason why I should consider making one database just for a users collection and other databases, one for each app versus just using one database for all of the apps?

Thanks!

Gabriel


One Database for Multiple Apps Strategy?

Posted: Thu Jan 22, 2015 9:16 am
by Illya Stepanov

Hi Gabriel -

[quote:]I'm assuming to do this I'd create one database for the multiple apps[/quote]
1) Yes, this approach is correct.

[quote:]Is there any down side to this strategy?[/quote]
2) Only inconvenience of having a lot of collections.

[quote:]Is there anything I should consider in making this decision?[/quote]
3) Your DB will run out of call limit and space limit much faster.

[quote:]other databases, one for each app[/quote]
4) This is the only approach to make it work. You would make it work if you separate Users collection. Instead of it you would need upon user sign up make sign up call for all DB of app that user might download.


One Database for Multiple Apps Strategy?

Posted: Thu Jan 22, 2015 4:16 pm
by Gabriel

Thank you Illya! I'm new and this helps me alot...

When you say the DB will run out of a call limit and space limit much faster, how so?

What is the call limit per database? Is call limit not restricted across all databases or is only per each database?

Also when you say space limit, isn't the Appery database space limit determined by account, not by individual database? So wouldn't one database of 400GB equal four databases of 100GB each for example?

Last - I didn't understand your last part entirely and had a question - what do you think about multiple apps sharing one separate database for a shared users collection but each app using their own database for all other collections? Is this a good or bad idea? Is making all of the apps use only one database better?

Thanks and sorry if I misunderstood anything...

Gabriel


One Database for Multiple Apps Strategy?

Posted: Fri Jan 23, 2015 11:30 am
by Alena Prykhodko

Hello,

[quote:]

Code: Select all

     limit much faster, how so? 
     The more app used by one DB the more calls will be. 

     What is the call limit per database? 
     Depending on your plan [url=http://appery.io/pricing/]http://appery.io/pricing/[/url] 

     limit determined by account 
     Yes, all databases that was created on you account then compared to the limit from your plan. 

[/quote]

In your case it is better to use only one DB.
Having one DB with shared users and other collection for all apps much easier to implement and maintain, logic in your app will be much easier.

Having one DB for users collection and separate DB's for each app will be not that easy, so definitely no.

Each case is unique, and it doesn't mean that anytime it is better to use one DB for all apps.


One Database for Multiple Apps Strategy?

Posted: Sat Jan 24, 2015 7:03 am
by Gabriel

I will use one database then for now then. I suppose if at a later date I could always separate them....

Thank you Alena!

Gabriel