Open supernyv opened 7 months ago
This is my proposed model, which I'm currently using for all input from and output to the database. @JorgeMiguelGomes
Thanks for sharing, @supernyv Make sure to convert the report --> answer_date to a TimeSTAMP.
Is there a reason for country region and sub-region?
Hi @Coding-with-Adam , Alright. For the country region and sub-region, those are not absolutely necessary but in analytics it is common to group some data by country, by region (say Europe) and by subregion (say Eastern Europe). But it all depends on the needs of the owner of the app. If they find it useful, we could either add these two columns to the application page for the user to input or have it exclusively updated by the app admin for each country added by users. If not, I can simply remove them
The updated model as of now. In particul:
I ended up adding more field to the vetted_user table to avoid splitting it into two tables (one for actual users and one for applicants):
So, now the admin page will be developed with this model in mind.
Kindly note that if you already have the database built and populated with data, no need to rerun the model (which would overwrite the existing database and replace with a blank new one), instead I have prepared update scripts for all the changes made so far, in the asset folder, but they need to be run in order of their creation date. Or if that's too complicated, you could simply forward engineer (run) the new model.
Major update
Hi @JorgeMiguelGomes Once you try the app, there will be one last decision to be made on the model: If we need to keep the history of changing user approval status. Illustration below: Setup 1 (Currently implemented):
Advantages of setup 1:
Disadvantages of setup 1:
Setup 2:
Advantages of setup 2:
Disadvantages of setup 2:
Discussion on the database design (RDBMS independent) to determine the best data model for the app.