hi thank you? what would be a better way to do this?
device uses http (usually I think REST) to talk to a server, server talks to the database and sends the response back.
Device knows nothing about there even being a database, let alone how to talk to it.
e.g. the device sends "send me the most current stockquote for ORA". Server then creates a database query to retrieve that data, packages it into a web service response, and sends it back (think "ORA 201301080745 123.32" or something like that).