[Rails] Re: Rails foreign keys and associations: when to denormalize?

2015-08-19 Thread Elizabeth McGurty
Was my offering helpful? On Monday, August 17, 2015 at 7:31:05 PM UTC-4, Elizabeth McGurty wrote: > > Oh! > > 1. You could just have a 'Participant' table, containing students, > professors, teachers, evaluators as distinguished by a role, is_active, > etc.. > 2. You could just have a 'Evaluat

[Rails] Re: Rails foreign keys and associations: when to denormalize?

2015-08-17 Thread Elizabeth McGurty
Oh! 1. You could just have a 'Participant' table, containing students, professors, teachers, evaluators as distinguished by a role, is_active, etc.. 2. You could just have a 'Evaluation_Detail' table, containing at a row level student_id, class_id, teacher_id, professor_id, evaluator_id for eac

[Rails] Re: Rails foreign keys and associations: when to denormalize?

2015-08-17 Thread Scott Goci
Hey Liz, Thanks for responding. Here's some initial responses: 1. While I understand the need in an actual application for things like a *Classroom* model (owned by a *Professor*), and then something like a *StudentClassroom* model (setting up *Students* to a *Classroom*) to bett

[Rails] Re: Rails foreign keys and associations: when to denormalize?

2015-08-17 Thread Elizabeth McGurty
Before I respond, I think that it would be helpful if you provided your database entity–relationship model. Also, I don't see that you have a Classes, the school variety, table. Liz On Monday, August 17, 2015 at 1:18:38 AM UTC-4, Scott Goci wrote: > > I've been wrestling with database normaliza