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 6016523
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T02:59:40+00:00 2026-05-23T02:59:40+00:00

I’m creating web application for my friend, a tutor school system. Now, I’m having

  • 0

I’m creating web application for my friend, a tutor school system. Now, I’m having a problem about designing table to store teacher record. Here is the scenario …

1. We have to create course first
2. Then we add teacher to course (Let’s say that we already have teacher record stored in teacher table), each course can have more than one teacher and each teacher can teach more than one course.
3. Everytime teacher come to teach, we keep record. Each teacher teaching at a course more than once.
4. By the end of the month, we pull all teaching record out and calculate money we have to pay

This is my current tables

// Course Table
course_id (PK)
...
...

// Teacher Table
teacher_id (PK)
...
...

// Course_teacher
course_id (FK: course.course_id)
teacher_id (FK: teacher.teacher_id)

The problem is I can’t add fee to the course_teacher table because at the first moment I add teacher to this course, there is no teaching happened yet. If I add column “fee” and “date” to this table, data will be like …

1,1,null,null (This record add before the course is starting, which I don’t like having null field(s))
1,1,50,2011-06-12 (This record add at the first time teacher is teaching)
1,1,50,2011-06-19 (This record add at the second time teacher is teaching)
…

I was thinking about adding one more table like

//Teaching_fee
course_id (FK: course.course_id)
teacher_id (FK: teacher.teacher_id)
fee
paid_status
date

If I do so,
1. course_teacher will keep information of teacher related to course
2. teaching_fee will keep information of the teaching fee

It should works. But, something in my mind is telling me that this is not right. Those two tables are similar to each other even their creation purpose are different.

Any suggestion?

Edit 1:
Just came up with one idea. What if do this way

//Course_teacher Table
id (PK)
course_id (FK: course.course_id)
teacher_id (FK: teacher.teacher_id)

//Teaching_fee Table
id (FK: course_teacher.id)
fee
paid_status
date

Final solution:
I decided to do as btreat suggested

// Course Table
course_id (PK)
...
...

// Teacher Table
teacher_id (PK)
...
...

// Course Teacher Table
course_teacher_id (PK) // synthetic
teacher_id (FK)
course_id (FK)
...
...

// Teacher Fee Table
course_teacher_id (PK)
date_paid (PK)
fee
paid_status
...
...
  • 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-23T02:59:41+00:00Added an answer on May 23, 2026 at 2:59 am

    This would probably be more normal.

    TABLE RateCards
    uid
    fee
    paid_status
    date

    TABLE Teacher_RateCards
    uid
    RateCardId
    TeacherId

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
Seemingly simple, but I cannot find anything relevant on the web. What is the
this is what i have right now Drawing an RSS feed into the php,
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I have a French site that I want to parse, but am running into

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.