Database design scenario for retail point of sales app

47 views
Skip to first unread message

mona...@gmail.com

unread,
Apr 19, 2017, 1:07:40 AM4/19/17
to back{4}app
Retail Pos app is an android app which will use parse as it's backend. here is the description and design requirements of app :
Description:
Pos app will be used to replace regular PC based solutions. It consists Product creation, category definition, product sell and purchase menus which utilize barcode scanner, product quantity report, sell and profit reports.
here are some cloud requirements of app:
- database should be be synced like the realm sync technology using Live queries.
- App should be offline first with the conflict resolution capability like what realm or couchbase offers (I think Parse Local storage can be used for this but not as strong as realm)

Question:

Parse database can be designed in two way:
1- Create App in back4App for every user 
  pro: the database size of app will be small which will lead to less query times for every user ( some users will have a lot of parseobjects in table suppose more      than 10k)
  cons: there will be a lot of apps in the cloud

2- Create one common app for all of users:
 pro: integrated database which can simplify product definition and insertion for individual customers since they have many products in common
cons: very big Product Table in one app ( suppose for 1000 customers each having 10k products leads to 10M parse objects in one table)

scenario 1 can be used for a big stores with a lot of branches which should work together in different places
What is your idea about query speed from a giant Table like the scenario 2 in parse? which scenario is best for this app.









casag...@back4app.com

unread,
Apr 19, 2017, 8:52:38 AM4/19/17
to back{4}app
Hello!

For what I can tell with the information that you provided us, I'd suggest you to go for a middle term between the two scenarios.

The main reason would be the high amount of objects on the Product Table, which would make the queries have a longer time response. However having an app for each user (On your assumption, about 1000 users) might also be a problem, since the supervision and control of usage for those apps would not be a simple task.

Possibly the best option would be to aggregate an amount of user per app (something around 10 users/app) and set them to use different Product Tables inside the app (e.g.: ProductTableUser1, ProductTableUser2...).

Also, if you want to test the possibilities within the Free Plan, please give it a try.

If you need anymore help feel free to contact us here at the Developer's Groups, at the Online Chat or at our email comm...@back4app.com

Best!
Message has been deleted

Mousa Najafi

unread,
Apr 20, 2017, 4:58:10 AM4/20/17
to back{4}app
Thanks for your suggestions. The mPos app will be used by store owners and I'm planning to design another app for those store's customers which should query the overall stores data from parse. So for this purpose I think I should design just one app on parse. but since maybe there will be a lot of stores I'll have many Tables in one app .
How many Tables in one app is possible or recommended ?
Also How should I calculate the traffic consumption (request/sec and Database and file storage usage ) by every user to calculate their fee like the way you use for your customers.

best wishes











casag...@back4app.com

unread,
Apr 20, 2017, 8:41:32 AM4/20/17
to back{4}app
Hello Mousa!

Answering your two questions:

1) We don't have a specific number of Tables recommended, however you must understand that as the number of tables grows bigger and bigger the time response might get slower. 

2) Back4app calculate the consumption of our customers by app, so on your case, that the users would be differed by Tables, I'm afraid we can't help on calculating the usage. For that purpose I'd recommend making more than one app (Not one per user, though), since you'd be able to have a control of those users' usage.

Best!

Mousa Najafi

unread,
Apr 20, 2017, 9:15:54 AM4/20/17
to back{4}app
Hello 

1) Does this means Parse server is not  suitable for big projects with a lot of Objects in one Table or having a lot of tables in one app ? Will this be resolved by increasing sever CPU's speed and memory?

2) Is it possible to calculate usage with help of cloud code?

best wishes

casag...@back4app.com

unread,
Apr 20, 2017, 9:49:23 AM4/20/17
to back{4}app
Hello!

1) Parse server does have a high consumption. However it's possible to have a better server response we have some great plans for Dedicated Instances. You can take a look at them here: https://www.back4app.com/pricing

2)  I'll email you with the team in copy se we can better discuss your questions and implementations for your creation, is that ok?

Best!

Mousa Najafi

unread,
Apr 20, 2017, 1:38:57 PM4/20/17
to back{4}app
Hi

Thank you very much for your kind attention. I'd like to discuss the project more in detail through email . I'll appreciate your helps 
Reply all
Reply to author
Forward
0 new messages