Designing the Blog Project's Database Models Schema

This post gives a visual representation of the database schema used for this portfolio site.

The database schema is illustrated by the visualisation tool built into JetBrains' database software called DataGrip. As an aside, I have tried many different database clients to handle PostgreSQL databases and DataGrip is certainly my favourite of them all.

Because the image requires space to view the entire schema, right-click on the image and click 'View Image' to see it more clearly.

In addition to all of the default tables that come as part of Django's installation, I have added a blog app which is the main app with most of the main functionality throughout the project.

The blog app has a Category model and a Post model. They are linked with a many-to-many relationship so that each post can belong to many categories and each category can have many posts.

There is also a custom user model which links Django's users to profiles. This is achieved by using Django signals.

The 'contacts' app contains a database table which captures the contact details for when people contact me through the contact form in the top left-hand corner of the home page of the site.