Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

How do I create a database that will generate a quiz with so many questions from each group?

3 Answers

Relevance
  • Jeff P
    Lv 7
    7 years ago

    This question cannot be easily answered. A database cannot do this on its own--you need use a programming language as the medium that interacts with the user and the database. If you have a more specific question, we could probably answer it. But, there's no way to really answer your current question.

  • 7 years ago

    The specification is a bit soft. You might begin with a table along the lines

    create table questions (

    category integer references categories.id,

    question character varying(200),

    answer character varying(200)

    );

    To then randomly select 10 questions from category 4 you do something like:

    select *, random() from questions where category = 4 order by random() limit 10;

    To add questions from the other categories simply repeat the query for each.

  • 7 years ago

    Youtube.

Still have questions? Get your answers by asking now.