Hasura Internship: Task 3.1
Hello all, this is the sixth blog in Hasura internship’s blogs series. This blog is for Task 3.1. In this blog I will write about the data modelling of my web app “Donate-it”. It is an app through which anyone who wish to help the needy by donating something can donate that by just a single click to any NGOs or similar organisations. You can take a look to the app idea and it’s prototype to undestand the data models better.
App Idea:
App Prototype:
So, What is Data Model ?
Data Model can be defined as an integrated collection of concepts for describing and manipulating data, relationships between data, and constraints on the data in an organization.
Why Data Model ?
- Creating data model prior to creating real database for our app allows to do any experiment we want to do with our thinking of the database for our app.
- In case of any error or any mismatch we can modify our data model easily instead of editing the real database.
- After data modelling is done and everything is correct than we can easily create real database without bothering about it’s correctness.
Data Model for the App:

I have used dbdesigner.net to create data model for my app. There are various other online softwares to do the same like: GenMyModel, Vertabelo, PonyORM etc. So, let’s discuss about the data model of the app.
As you can see there are 4 tables and 2 views in the data model, so let’s discuss about each of them:
Tables:
- hasura_auth_user: This is a auth table present before in the Hasura platform in which a new entry is automatically made when a new user signup to the app.
- profile: This table conains extra information about the user like their full_name etc. and the user_id of this table is from the hasura_auth _user table.
- donation: This table contains information about each donation that is done through the app.
- organisation: This is the table that contains information of every organisation that is available on the app.
Views:
- full_profile: This is the view which contains full information about a user i.e. information in table hasura_auth_user along with the information in profile table.
- points: This view contains total points earned by all the users through their donation.
So, this is all about the data model of my app, I will update the blog if any modification is done. Thank You.