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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T05:15:14+00:00 2026-05-18T05:15:14+00:00

another database structuring question, hope you guys dont mind :D i am having this

  • 0

another database structuring question, hope you guys dont mind 😀

i am having this video quiz on my web, with this kind of flow:

  1. the viewer will watch a video
  2. that particular video has a question attached to it
  3. and it also has 2 questions, one of them is false and of course the other is true

so far i have figured out two database design for this

the 1st one is:

table: video 
fields: id, filename, type, size, created

table: question 
fields: id, question, right_answer, wrong_answer, video_id

the 2nd one, i am separating the question and the answer on each different tables

table: video 
fields: id, filename, type, size, created

table: question 
fields: id, video_id, question

table: answer
fields: id, answer, video_id, status

the status field in answer’s table is to indicate whether the answer is right or wrong, probably using tinyint by the value of 0 and 1

which one would you guys recommend me as a better approach and why, and since i don’t really understand database normalization, is there any easy to understand article so that i can improve my knowledge regarding that, any help would be much appreciated, thanks

Regards

Update:

thank you everybody for pointing out a better approach for my database design, since everyone is suggesting that i should use boolean or bit as field type and i always use tinyint for fields like this before :p, so i search over for a solution on what type should i use in mysql to represent boolean, and i stumble upon this Which MySQL Datatype to use for storing boolean values from/to PHP? and according to the answer of that question i should use tinyint(1), so i guess it’s safe to say that i will keep using tinyint for now :p

thanks again everyone

  • 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-18T05:15:14+00:00Added an answer on May 18, 2026 at 5:15 am

    Forgiving the ASCII, I recommend the following:

    VIDEO                Question             Answer
    |- id       1--.     |- id       1--.     |- id
    |- filename     '--* |- video_id     '--* |- question_id
    |- type              '- question          |- answer
    |- size                                   '- correct (bit, not tinyint)
    '- Created
    

    That gives you the freedom of adding multiple questions on a video, and multiple answers to each question. Also, i suggest using a bit (not a tinyint) to flag the “Correct” answer. I also tried to show how the keys would align in this scenario.

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

Sidebar

Related Questions

I'm copying and updating data from another database to mine (programmatically), this works fine
I am having one database 1 on one live server and another database 2
I have a table in one database, call this db x. I have another
I'm looking at having certain users access one database and other users accessing another
I'm trying to establish a second database connection to another database on another server.
I have a bunch of records I want to move to another database and
I have a table Person which contains 2 fields.In my another database i have
I am importing a table from one database to another in SQL Server 2008
I have SMO code which copies tables from one database to another. It runs
I'm trying to export the schema of my database so another developer can have

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.