Functionality to get articles from a database