title: How can I securely (indirectly) query a postgresql database within android?
body: <p>The current solution that I have to adopt uses JDBC and stores the user/password of the database inside the android app. That's as far as I'm concerned not a good solution. I would like to implement a mapping layer on the webserver in the middle.</p>
  
  <p>Is there any best practice or recommended strategy for this? Should I use SOAP or JSON or something completely different (because they're well implemented and/or easy to use in Java)?
  Are there any mapping tools for postgresql &lt;-> SOAP/JSON/whatever in PHP or will I need to write these scripts by myself?</p>
  
  <p>Any pointers will be greatly appreciated.</p>