Logic for reading blog posts from DB