Jack, You will need another table to tie it all together. Something like:
----Students_Courses---- student_id course_id assignment_id mark_id I'm new to CakePHP so this might not be the best way to accomplish this via Cake. Patrick On Fri, Oct 30, 2009 at 6:11 AM, japaternoster <[email protected]> wrote: > > Hi, > > I am relatively new to database design and have only made some > relatively simple CakePHP apps, but am currently working on a new > project with some slightly more complicated database relationships. > > --Students---------------- > student_id > student_name (I want to leave this as a single item) > year > > --Courses---------------- > course_id > name > shortname > type > > --Assignment---------------- > assignment_id > type > value > description > > --Marks---------------- > mark_id > result > > The idea is that each *student* takes x *courses* and each *course* > has y *assignments*, so each *student* has a *mark* for an > *assignment* of a *course*. Is this the easiest way of doing this? > > Also, what does this mean for HABTM/has many relationships? > > Thanks > > Jack > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
