Schema - nikeshashar/tutorialreport GitHub Wiki

Welcome to the tutorialreport wiki!

Let's have a think about what the schema for tutorialreport will look like. What kind of Objects do we want, and how should they relate to each other?

Current Schema

  • Tutorial Object
    • ID >>> primary key for reviews
    • tutorial_name
    • tutorial_link
    • tutorial_average_score
    • tutorial_description
    • created_at
    • updated_at

Each tutorial object will have a one to many relationship with the reviews

  • Review Object

    • ID >>> primary key for comments
    • tutorial_name
    • tutorial_score
    • tutorial_comment
    • tutorial_id
    • updated_at
    • created_at
    • tutorial_id >>> foreign key connection to tutorials
    • user_id >>> foreign key connection to users
  • Comment Object

    • ID
    • comment_text
    • review_id
    • user_id
    • updated_at
    • created_at
  • User Object

    • ID >>> primary key connection for reviews and comments
    • user_name
    • user_email
    • admin? >>> Those who are admins can add new tutorial objects

Each user object will have a one to many relationship with reviews and with comments

Future Schema Ideas

Schema Idea

Schema Idea

Schema Idea