Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7055793
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:47:28+00:00 2026-05-28T03:47:28+00:00

Currently, I’ve created 2 classes: Students and Courses. All we’re going to focus on

  • 0

Currently, I’ve created 2 classes: Students and Courses. All we’re going to focus on here are the proficiencies. So, each course_type has their own set of proficiencies (saved in course_proficiencies – and each course has a course type). Once a student signs up for a course, I want to be able to track how many proficiencies they have completed (once a student completes a proficiency, a row is added to student_proficiencies).

a schema http://slickrocksolutions.com/test/schema.png

Now.. In order to get proficiencies(and completed proficiencies), should I create a new class called StudentProficiencies with getCourseProficiencies() and getCompletedProficienciesByStudent($studentID), or, should I do something:

$course->getCourseProficiencies();
$student->getCompletedProficiencies($courseId);

And, how would you recommend me adding a proficiency? If I don’t create a new class, it could be:

$student->completeProficiency($proficiencyId, $courseId);

Any thoughts?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T03:47:29+00:00Added an answer on May 28, 2026 at 3:47 am

    Three classes:

    Student,
    Course,
    Proficiency

    Course_type is a property of Course.

    hash tables as follows:
    course_type_to_proficiency,
    course_to_student,
    course_to_course_type

    I think that should allow you to do a Student method to look up proficiencies with a query similar to this:

    Student->get_proficiencies( // connec to DB etc,
    ‘SELECT cttp.proficiencies FROM course_type_to_proficiency cttp INNER JOIN course_to_course_type ctct ON cttp.course_type_id = ctct.course_type_id INNER JOIN course_to_student cts ON ctct.course_id = cts.course_id WHERE student_id = ###’

    No need to make course type it’s own class unless it doesn more than just join courses, students, and proficiencies. If you need to track a completed field per course, or course_type create another hash table with for that.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Currently, my MVC 3 app has a dependency on a static class that is
Currently, when my server goes to store a character's information, it'll delete all records
Currently I have a UITableView with custom cells and in each cell there is
Currently I have 2 apps, App1 and App2. App1 has an app.config file where
Currently, I have a custom list adapter that has some logic that hide/show a
Currently, I don't really have a good method of debugging JavaScript in Internet Explorer and
Currently my workflow with Emacs when I am coding in C or C++ involves
Currently we have a hybrid ASP/PHP setup connecting to a SQL Server 2005 database.
Currently we have a project with a standard subversion repository layout of: ./trunk ./branches
Currently I'm doing some unit tests which are executed from bash. Unit tests are

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.