added R.java to commit
expanded DB contracts
implemented non-crashing a sample query in main activity