A data model to make perusing the database easier

Haha Osioke,

A very fair shout! Touché…

So most folk who work with databases (not just data architects! Developers too!) find it very helpful to have some sort of a data model that shows them how the various tables are connected to each other.

For example, let’s take my query ;), I needed several pieces of information about a user - I required information about a user who:

  • was in (or not in) a particular group
  • had solved topic
  • within a certain date range

To answer the above, I need the users table, the user_actions table, and the groups table. A data model would have shown me that I can link a user to a user action via id/user_id, and to link a user to a group via their primary_group_id/id visually.

It helps to visualise not only what data is available, but how to join it, especially if there are some long-winded queries at play.

Yes you could click through every single table in the data explorer to figure out what fields are available and write them down so that you don’t forget, but having a data model may be a bit more humane for some of us :slight_smile:

5 Likes