Files
myrepoes/quiz_game/docs/roles/database-designer-danil.md
2025-12-16 07:23:26 +00:00

3.3 KiB

DANIL - DATABASE DESIGNER MISSION Your Role: Question Master | Your File: questions.json

💡 What You're Building: You're creating all the quiz questions about Russian culture!

📋 LESSON 1-2: SETUP & BASIC QUESTIONS

Step 1: Fork and Clone (10 minutes)

  1. Go to: https://gitea.techshare.cc/technolyceum/ai6-m2
  2. Click the "Fork" button (creates your copy)
  3. Copy your forked repository URL
  4. Open Terminal and type: git clone [YOUR-FORKED-URL-HERE] cd ai6-m2 git checkout -b danil-database-work

Step 2: Review the Question Format (10 minutes) Open questions.json and look at the example:

[
  {
    "question": "What is the capital of Russia?",
    "options": ["St. Petersburg", "Moscow", "Kazan", "Sochi"],
    "correct_answer": "Moscow"
  },
  {
    "question": "Which Russian author wrote 'War and Peace'?",
    "options": ["Dostoevsky", "Tolstoy", "Pushkin", "Chekhov"],
    "correct_answer": "Tolstoy"
  }
]

Each question needs:

  • question: The actual question text
  • options: 4 possible answers (A, B, C, D)
  • correct_answer: The right answer (must match exactly one of the options)

Step 3: Understand the Current Implementation (15 minutes) Notice that the current implementation:

  • Has properly formatted JSON (no comments)
  • Has 5 sample questions about Russian culture
  • Follows the correct structure for integration with the backend

📋 LESSON 3-4: EXPANDING THE DATABASE

Step 4: Add More Questions (30 minutes) Add at least 10 more questions to reach a total of 15. Here are some examples:

  {
    "question": "What is the traditional Russian soup made with beets?",
    "options": ["Shchi", "Borscht", "Solyanka", "Ukha"],
    "correct_answer": "Borscht"
  },
  {
    "question": "Which Russian ruler was known as 'The Terrible'?",
    "options": ["Peter I", "Catherine II", "Ivan IV", "Nicholas II"],
    "correct_answer": "Ivan IV"
  },
  {
    "question": "What is the name of the famous Russian ballet company?",
    "options": ["Moscow Ballet", "St. Petersburg Ballet", "Bolshoi Ballet", "Russian National Ballet"],
    "correct_answer": "Bolshoi Ballet"
  }

Requirements for new questions:

  • Make sure questions cover different aspects of Russian culture (history, literature, food, arts, geography)
  • Ensure plausible wrong answers that are not obviously incorrect
  • Verify that the correct_answer exactly matches one of the options

MongoDB Connection Instructions

To connect to the MongoDB database:

  • URL: mongodb://ai6s3:Student123!@localhost:27017/student_db
  • Username: ai6s3
  • Password: Student123!
  • Database: student_db

To import your JSON data:

  1. Save your JSON data in a file named data.json
  2. Run the following command in terminal:
mongoimport --uri="mongodb://ai6s3:Student123!@localhost:27017/student_db" --collection=questions --type=json --file=data.json --jsonArray

Make sure your JSON data format matches the expected schema for the application.

DANIL'S COMPLETION CHECKLIST ☐ Understand the question format ☐ Review current implementation ☐ Add 10+ more questions about Russian culture ☐ Verify all questions follow the correct structure ☐ Check that correct_answer matches exactly one option ☐ All code pushed to your branch ☐ Created Pull Request for teacher to review

🎉 Congratulations Danil! You built the entire question database!