Script for accessing the database, to be used for Android app