Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Nurul Eka Fitriany Hilal
10,720 Pointsdatabase for mobile apps and web apps
Hi everyone, I got the project to make mobile apps for my website but I'm still confused about how to store the data from mobile apps so then it is still sync to data from web apps, my question is: Do i need to separate the database? Anyone can show me what course should I learn in teamtreehouse for this topic? thank you
2 Answers
Vanessa Cantero G贸mez
7,376 PointsYou will need a single database. This database will be in your Backend. To have the same information in the web app and the mobile app you will need a RESTful API. Using a RESTful API, your mobile app will be able to create, update, download and delete data in you backend database.
One of the main reasons to have a database in your phone is to cache data. Imagine you need to upload data to the backend and your connection fails. You can store the data in the phone and upload it later.
Nurul Eka Fitriany Hilal
10,720 PointsThank you Vanessa Cantero G贸mez for your help