General DB design question

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
thetoolwiz
Posts: 8
Joined: 2016-04-04 19:59

General DB design question

Post by thetoolwiz » 2016-04-27 19:04

I've got a general DB design question that may not be very uncommon, and I'm wondering what the best approach to take with AppGini.

I'm building a system and I've got People involved.

These People can have several Roles, eg.: Student, Teacher, Administrator, Liaison, Mentor, etc.

It's not uncommon for an individual to have multiple roles: a Student can also be a Mentor; a Teacher can be a Mentor and an Administrator, etc.

One approach is to have a Person record that has a Roles field with multiple options allowed.

Another is to have a Person record that's never used directly, but have secondary records for each Role that relate back to the associated Person record.

The third is to have separate records for each Role that duplicate the data fields that would be in the Person record, but no common Person record.

The key thing is, I want individuals to be able to effectively "login" as a particular role and navigate through the app in that role, not as someone who can assume ANY role. So someone logs in as a Student, and they can look at their classes, add and drop classes, view and perhaps select Mentors, etc. As a Mentor, they can see the people assigned to them as mentees, add and drop mentees, and so on. Teachers can see the classes they're assigned, the people registered in each class, perhaps modify their class rosters, etc.

Also, if someone is logged in as one Role and they want to take on another role, say a Student wants to become a Mentor, it would be best if they can just have the new Role added. I don't want to require a DB Admin to do that, although perhaps someone could have a Role that lets them approve such requests (eg., a Teacher can approve Students who want to become Mentors).

Obviously, it's all the same data underneath. It's just the navigation that's going to change based on a user's Role, and some of the "business rules".

How can I approach accomplishing something like this in AppGini? How close can I get to what I need?

-David

AhmedBR
AppGini Super Hero
AppGini Super Hero
Posts: 327
Joined: 2013-09-19 10:23

Re: General DB design question

Post by AhmedBR » 2016-04-27 19:37

David, this is not supported by AppGini out of the box till now, take a look at this:
http://forums.appgini.com/phpbb/viewtopic.php?t=683
AppGini 22.14 - xampp 3.3.0 - PHP 7.4.30 - Summary reports - Calendar - Mass update - Messages - AppGiniHelper

thetoolwiz
Posts: 8
Joined: 2016-04-04 19:59

Re: General DB design question

Post by thetoolwiz » 2016-05-03 05:13

"till now"? Is something finally maybe about to be released?

This thread dates to mid-2013, and it seems to be a popular request.

Can this be accomplished with existing hooks?

-David

Post Reply