Friday, October 30, 2009

Re: Database design

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
<japaternoster@googlemail.com> 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 cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: