General question: multiple tables joins to represent repeat groups or one massive table

dealio

Member
Hi I'm trying to figure out the best design when creating a fabrik form based on multiple joins for repeating groups.

In regard to forms performance, let?s say I have a form called school classes and want to have three repeat groups within it; each with the same fields ?first name? and ?last name?
FORM myClass
Repeat group1 (teacher) (max 2 records)
Repeat group2 (teachers aid) (max 3 records)
Repeat group3 (student) (max 40 records)


Is it better to have 3 tables each representing the above repeat groups OR one single massive persons table
Class_table
-----------------------
id | school_name
1|class | math123

persons table
------------------
id| type| name
1 | teacher| bill
2| student| tom
3|teachers aid | ted
4|teachers aid | ted



OR should the table be separated like

Class_table
-----------------------
teachers_table
----------------------
students_table
-------------------------
teachers_aid_table
---------------------------



For performance purposes which is the better model?


LIST DESIGN 1
class_table->
-> join->teachers_table (id)(repeat group)
-> join->students_table (id)(repeat group)
-> join->teachers_aid_table (id)(repeat group)

OR

LIST DESIGN 2
class_table ->
-> join->persons_table (join id and person_type_field = teacher)(repeat group)
-> join->persons_table (join id and person_type_field = teacher_aid)(repeat group)
-> join->persons_table (join id and person_type_field = student)(repeat group)



Which model is better LIST DESIGN 1 versus LIST DESIGN 2 when dealing with a lot of records?

I know that fabric starts to slow down the more joins you have so should I use one massive persons table, and if so how would I represent the repeat group for a specific person type (teacher, aid, student)?


Thanks
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top