Database modelling

And a version for postgresql:

3 Likes