Added database funtionality
Database funtionality added.