integrate database.py functions to RssData class, remove duplicate code