Updates on database class

Now database class can read data from mysql