Is the database design alright? And I'm quite lost with the admin entity here

All we need is an easy explanation of the problem, so here it is.

A quick description of my system would be: there are 2 users: users and admin.

User registers on the website. Upon registration, the system will generate a QR code for the user. The user then goes to be vaccinated, and upon vaccination, someone will be able to scan his/ her QR code and the status of the user will be updated as vaccinated with the 1st dose of the vaccine. Additional information will also include, the date for the 2nd dose of vaccination, the doctor who was responsible for the vaccination, date and time of the vaccination. The user can also give his feedback for the side effects per dosage.

On the admin’s side:

  • able to log in
  • they will have a report in the graph for each of the vaccines and the percentage of how many
    were vaccinated with these types of vaccines.
  • graph of side effects per dosage of each of the vaccines
  • add, edit, and delete a doctor
  • add, edit, delete a vaccine
  • it will also include Analytics for the frequency of the users
  • list of those users

This is the database design I have come up so far and I’m needing help if this is correct and I’m a little lost with the admin entity here.

Is the database design alright? And I'm quite lost with the admin entity here

How to solve :

I know you bored from this bug, So we are here to help you! Take a deep breath and look at the explanation of your problem. We have many solutions to this problem, But we recommend you to use the first method because it is tested & true method that will 100% work for you.

Method 1

Authentication and authorization for the administration logic should be handled by the application, so it is natural that the Admin entity will feel disconnected to your domain. You could expand into other entities, such as Permission and Group, so you can have fine-grained control over what exact permissions an administrator, or group of administrators, can have. Enforcing those, however, will be on the application side.

The rest of your design looks pretty coherent. Keep it up!

Note: Use and implement method 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply