I am beginning work on a module to manage Educational Institutions (EI)
I have been referring few modules to understand the creation process. I have a certain queries, hope I can get some suggestions.
Currently I have two tables...
1. modx_ei_coll (contains EI information like Name,Address,Year of Establishment, etc. for each EI)
2. modx_ei_programs (program details for programs offered for each EI e.g. coll_id,Program Name,Duration,Fees,Intake,etc. )
Where I am confused...
Each EI differs in the number of programs they offer e.g. EI_1 offers 2 programs whereas EI_2 offers 7 programs.
How can I manage the ei_programs table for each ei_coll database entry?.
-Raavi
-
☆ A M B ☆
- 24,524 Posts
Use a third table with only two fields relating the institution ID to the program ID. Thus if both institutions offer "Underwater Basketweaving", then you’ll have two entries in the institution_programs table, one for each institution offering that program, while if only one institution offers "Wobulater Calibration" then you’d only have one entry for it.
Thanks sotwell, i’m not sure if i understand what you suggest.
I will do some more reading and understanding and come back with more specific questions.
Can you please point me to some tutorial or a developed module where the requirements are similar to mine. For e.g. a phonebook where each person has multiple phone numbers.
-Raavi