Created RecordTest.java and edited db and record

Added RecordTest.java
Edited Database.java and Record.java by rewriting most of the methods. I
left the old methods that were replaced with single ones. I will get rid
of them later. The application is now broken. I am getting a null
pointer exception when querying records. I will fix later.