Search Results

Search found 2 results on 1 pages for 'yandawl'.

Page 1/1 | 1 

  • Struggling to create correct relationships in MS Access

    - by Yandawl
    http://img714.imageshack.us/img714/7820/croppercapture1.png Basically: an award(course) has many units, which can be either optional or core(mandatory), depending on the award. So for example: the unit 'Advanced Software Engineering' maybe a core unit for the award 'Software Engineering BSc' but only an optional unit for the course 'Web Technology BSc'. I've used flags for that purpose. A student is enrolled on an award so I need to get a complete list of core and optional units (bearing in mind that a student chooses 1 out of many possible optional units). Also, these units have events, e.g, a lecture, workshop or seminar, etc. and those events have sessions or instances of events where students enrolled on that particular unit are required to attend, and those attendances are stored in a separate table to form a register. So I need a hierarchy of expanding the tables something like this I guess: Awards - Students - Units - Sessions - Attendances Any help with this would be appreciated... It's blowing my mind and I'm really close to going insane! My tutor didn't spot I'd got it wrong when I showed my original data model to him and it's due in next week! Thank you :D

    Read the article

  • Complicated SQL query

    - by Yandawl
    Please bare with me this is difficult to explain xD http://img90.imageshack.us/i/croppercapture1.png/ This is based on an undergraduate degree course where a student takes many units (say 4 core units and 1 optional unit per year). tblAwardCoreUnits and tblAwardOptUnits store which units are optional and core for which award, hence the relationship to tblAward and tblStudentCoreUnits and tblStudentOptUnits store the particular instances of those units which a particular student is taking. Secondly, a unit can have multiple events (say a lecture and a unit) and each of those events has sessions in which a student can attend, hence tblEvents, tblSessions and tblAttendances. The query I am trying to produce is to get a list of all level one students, grouped by their award that lists the percentage of attendances in all the units in the current level. I've tried and tried with this and the following is the best I've managed to come up with so far... I'd REALLY appreciate any help you can give with this! SELECT tblStudents.enrolmentNo, tblStudents.forename, tblStudents.surname, tblAwards.title, (SELECT COUNT((tblAttendances.attended + tblAttendances.authorisedAbsence)) AS SumOfAttendances FROM tblAttendances INNER JOIN (tblStudents ON tblStudents.enrolmentNo = tblAttendances.enrolmentNo)) / FROM tblUnits, tblAwards INNER JOIN ((tblStudents INNER JOIN tblStudentOptUnit ON tblStudents.studentID = tblStudentOptUnit.studentID) INNER JOIN tblStudentCoreUnit ON tblStudents.studentID = tblStudentCoreUnit.studentID) ON tblAwards.awardID = tblStudents.awardID WHERE (((tblStudents.level)="1") AND ((tblStudents.status)="enrolled")) GROUP BY tblAwards.title ORDER BY tblStudents.forname;

    Read the article

1