Many to many question RRS feed

  • Question

  • I have a commercial db I'm querying (I didn't design it!) which isn't properly normalized, and I'm trying to represent a many-to-many in the entity model.. but I can't figure it out!


    We have a Review table like this:

    reviewid (int pk)

    forstudent (int not null) *

    forcourse (int not null) *

    (other fields)


    Then the Enrolment table is like this:

    enrolmentid (int pk)

    student (int not null) *

    coursecode (int not null) *

    (other fields)


    The many-to-many fields are marked with '*'.


    I just want my Review entity to have a collection of enrolments that match, and visa versa. But I am unable to define an association based on anything other than the pk's.


    Can anyone help?



    Wednesday, August 13, 2008 8:21 AM