Develop a blog - Part 7: Store and retrieve blog posts
We need a persistence layer on our blog. Authors need to store a blog post in order for a reader to actually read it. Currently we have all functionality in place around creating and updating a blog post, but we don't have any persisitence in place yet. Which makes our blog utterly useless. Until now we pushed the decision for a persistence layer forward, because we wanted to focus on the business logic first. That way we would be in a better position to decide on what technology to use for our persistence layer.
When we started our journey we had the idea that we might be able to use a flat file system or a relational database for our blog. Now that we have most business logic in place we notice that there are some relational relationships emerging in our design. Unfortunately we also have some object oriented concepts in our design that don't really match with a relational database.
Let's investigate and see how best to implement a persistence layer using PostgreSQL as the persistence layer.