3.1) Data Modelling

ALOK SHAKYA
2 min readJul 19, 2017

--

In third week my first task is to draw data model for my blogging app.

But before moving to the data model I would like to provide the links to my previous blog 1.1 and 1.2 so that you can better understand what the data model I am going to make.

Now coming to the data modeling I have used https://dbdesigner.net to draw data model.

So, What is dbdesigner?

DbDesigner is a web application which allows you to design your database schema without writing SQL.

You can design your database schema just like creating a UML diagram.
When you are finished you can generate an SQL script for the following database engines:

  • PostgreSQL
  • SQLite
  • MySQL™
  • MSSql™
  • Oracle®
Data Model

How will I use this data model?

First of all I would create a VIEW named as artilcle_likes which will store the article_id and no_artile_likes. Similarly I would create another VIEW named as comment_likes which would store comment_id and no_comment_likes.

Then I would create another VIEW named as all_artilces which will contain following columns: article_id, user_id, title, category, created(timestamp), content, likes, comments. This VIEW will serve all articles data in JSON format. Similarly other VIEW will be created for each category in my prototype.

In my next blog I will explain about 3.2) Hasura Data API + Postman collection.

Thanks for reading.

Previous Next

--

--