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

  • Home
  • SEARCH
  • 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 5944231
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:30:29+00:00 2026-05-22T16:30:29+00:00

I’m a student learning SQL and PHP, I have been set a task to

  • 0

I’m a student learning SQL and PHP, I have been set a task to create a student feedback form using PHP and mySQLi, and im really stuck at getting my head around how to design the database for the project!

I’m creating a system where users can log into a web page, and if the user is a student, they can see a page to leave feedback for each lesson had for each module (class). If they are a tutor, when they log in they can view the feedback, add modules with the amount of lessons there will be and add student accounts.

I don’t understand which would be the best way to create the tables for the database, especially as I understand you cannot put a table within a table, I was going to have a table for modules and within each module would be a table for each lesson which is a table holding each item of feedback and a few other variables such as an additional message.

How can I structure my database without creating hundreds of tables and trying to link them together, as I’m new to SQL and this seems a very long winded untidy way.

I’ve been trying to get my head around databases for days now and I just don’t know what to do!

  • 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-22T16:30:30+00:00Added an answer on May 22, 2026 at 4:30 pm

    You shouldn’t need hundreds of tables! You will, however, need to link them using primary keys. This is the essence of SQL, and newbie or not, that’s exactly what you need to learn.

    In essence, you are putting a table inside a table, but you link them together by matching keys:

    student_id  student_name
    1           Bob
    2           Jane
    
    comment_id  student_id  comment_body
    123         2           Jane says hi!
    124         1           Bob says hi also!
    125         1           Bob says hi again!
    

    When you query these tables, you connect them together in your SELECT statement:

    SELECT student_id, student_name, comment_id, comment_body
    FROM student, comment
    WHERE student.student_id = comment.student_id
    
    
    student_id  student_name  comment_id  comment_body
    2           Jane          123         Jane says hi!
    1           Bob           124         Bob says hi also!
    1           Bob           125         Bob says hi again!
    

    The rows you get back are a combination of the two tables, connecting (or JOINing) the two together wherever the primary key (in this case, student_id) is equal in both tables.

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

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I have a text area in my form which accepts all possible characters from
I have thousands of HTML files to process using Groovy/Java and I need to
I'm trying to create an if statement in PHP that prevents a single post
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
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

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.