• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

General question: Connecting apps to databases

I have a general question about Droid apps connecting to databases. Here's the background of why I want to know:

There is an app called Foursquare. It let's friends coordinate their calendars and list restaurants they'd like to visit. On any evening, it figures out when all the friends are available for dinner, picks a restaurant they want to try, AND NOTES WHEN A TABLE IS AVAILABLE AT THAT RESTAURANT.

Where would a programmer find such database information about restaurants? Does it have to be created and maintained by the app programmer or is there just a list of databases out there that maintain restaurant seating charts, sport team schedules, concert venues in any given town, etc. that app developers can tie into for their apps.

Thanks in advance...
 
I don't know the answer to this, but my guess would be that there is a website (or some service) that keeps track of whatever the programmer needs, and then the programmer just accesses that service and formats the information to display. If the service that the programmer needs doesn't exist, they can just create it (although maybe just is not the best word to use, lol) and then access it and parse it.
 
  • Like
Reactions: IMJustCurious
Upvote 0
I have a general question about Droid apps connecting to databases. Here's the background of why I want to know:

There is an app called Foursquare. It let's friends coordinate their calendars and list restaurants they'd like to visit. On any evening, it figures out when all the friends are available for dinner, picks a restaurant they want to try, AND NOTES WHEN A TABLE IS AVAILABLE AT THAT RESTAURANT.

Where would a programmer find such database information about restaurants? Does it have to be created and maintained by the app programmer or is there just a list of databases out there that maintain restaurant seating charts, sport team schedules, concert venues in any given town, etc. that app developers can tie into for their apps.

Thanks in advance...

There is something called a webservice. Android SDK supports REST Style web services where an app can exchange data with a web server by doing http request and parsing the response. I can tell you 110% that a local database cannot handle this. If there is no restaurant tracking well know web service available you can create your own by parsing the websites that display such information (this would be a hack). Hope this makes sense :)
 
  • Like
Reactions: IMJustCurious
Upvote 0
There is something called a webservice. Android SDK supports REST Style web services where an app can exchange data with a web server by doing http request and parsing the response. I can tell you 110% that a local database cannot handle this. If there is no restaurant tracking well know web service available you can create your own by parsing the websites that display such information (this would be a hack). Hope this makes sense :)
So let's say there is a site NiteLifeBoston.com and they list all the dance clubs, with hours, dress code, cover charge, specials... you're saying a programmer of an app can hack into that database and reformat the information to use in the app? If so, my fear would be that they website goes down or changes things and my "parasite" app stops working. Am I getting this right?
 
Upvote 0
Yes, if you're "leeching" off of a website that you don't control and the website stops existing then your app will stop working. I think I read something in the latest Google Market terms that said your customers will all get a refund if something like that happens within 1 year, but I can't remember exactly. (assuming it's a paid app, of course)
 
Upvote 0
So let's say there is a site NiteLifeBoston.com and they list all the dance clubs, with hours, dress code, cover charge, specials... you're saying a programmer of an app can hack into that database and reformat the information to use in the app? If so, my fear would be that they website goes down or changes things and my "parasite" app stops working. Am I getting this right?

Yes Sir. From your app code you can simply make "HTTP REQUEST" to the website. You will get HTML in response. Figure out what are the tags you are looking for and you can get the data you are looking for without any database. The bad part is if they change their design , you will have to update how your system works. I have libraries in .Net and Java that does this using regular expressions :D If you want email me and I can share those.
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones