4 Replies Latest reply on Aug 18, 2016 4:55 AM by fmpdude

    Help with my teacher DB

    prezeus

      Hi guys and greetings from Spain. I'm pretty new to filemaker, I made a solution that works really well, and gives me the average of the different exams among other things.

       

      I have three tables one for each type of exam, it calcules the average and gives me the score. Now I want to search for the score of a student in the three exams and calcule and save the average. How should I do it?

       

      Thank you in advance.

        • 2. Re: Help with my teacher DB
          Johan Hedman

          You need a 4th table to save your total scores in. Create a script that collect your scores in variables and then Set Field in your new table.

          • 3. Re: Help with my teacher DB
            prezeus

            Thank you very much for your answer. I will try.

             

            Greetings

            • 4. Re: Help with my teacher DB
              fmpdude

              Why do you have three tables and not just one table with a "discriminator" field for "ExamType"? The ExamType field could either be a table (lookup) or possibly a FileMaker Value List.

               

              Consider this: What if you had 10 exams. Would you really have 10 tables? No! A single table is probably all you need unless there's something overarching you're not saying.

               

              Therefore, your issue sounds more like a database design issue.

               

              Once you have the correct design, your calculations will be much simpler. I would recommend you take a course on Lynda.com (or YouTube, etc.) that shows you how to model databases. FileMaker doesn't help you with modeling (has no ERD tool, nor claims to) and even encourages you to "JUMP IN" when you're possibly not ready.


              As the other poster said, you will want a student table.  And, since each student can have many exams and an exam can be taken by many students. you have a many-to-many relationship. Thus, if you need to consider both sides of that relationship, you'll need a M:M resolver table (EXAM_STUDENTS, for example).


              With the correct data design, you'll find things go well. With a sub-optimal, non-normalized, database design, you'll be pulling your hair out all the time trying to get the smallest thing to work.


              Take a step back.

               

              HOPE THIS HELPS.