note/copilot/copilot-conversations/知识图谱数据库设计_学习纪录表learning_record是否要记录题目@20251105_103132.md
2025-11-19 10:16:05 +08:00

2.3 KiB
Raw Permalink Blame History

epoch modelKey topic tags
1762309892107 deepseek-chat|3rd party (openai-format) Learning Record Score Design
copilot-conversation

user: 知识图谱数据库设计 学习纪录表learning_record是否要记录题目的满分是多少 [Context: Notes: 知识图谱/知识图谱数据库设计.md] [Timestamp: 2025/11/05 10:31:32]

ai: 是的,强烈建议learning_record 表中记录题目的满分信息。

基于你现有的数据库设计,我建议在 learning_record 表中添加一个 max_score 字段:

CREATE TABLE learning_record (
    id BIGINT AUTO_INCREMENT PRIMARY KEY,
    student_id VARCHAR(20) NOT NULL,
    problem_id VARCHAR(20) NOT NULL,   -- T3-1-1-E02
    knowledge_id VARCHAR(20) NOT NULL, -- K3-1-1-02
    method_id VARCHAR(20),             -- M3-1-1-01 (可选)
    question_part VARCHAR(10),         -- 小题1/小题2/整体
    is_correct BOOLEAN NOT NULL,       -- 正确/错误
    score DECIMAL(5,2),                -- 得分(0-100)
    max_score DECIMAL(5,2) NOT NULL,   -- 新增:该题/该小题的满分
    response_time INT,                 -- 答题时间(秒)
    attempt_count INT DEFAULT 1,       -- 尝试次数
    exam_date DATE,                    -- 考试/练习日期
    created_at TIMESTAMP DEFAULT NOW(),
    
    FOREIGN KEY (student_id) REFERENCES student(id),
    FOREIGN KEY (problem_id) REFERENCES problem(id),
    FOREIGN KEY (knowledge_id) REFERENCES knowledge(id),
    FOREIGN KEY (method_id) REFERENCES method(id)
);

为什么需要记录满分?

  1. 准确计算得分率得分率 = score / max_score
  2. 题目难度标准化不同题目的满分可能不同选择题2分大题10分等
  3. 公平比较:避免因题目分值不同导致的统计偏差
  4. 掌握度计算:在 knowledge_mastery 表中计算掌握度时,需要考虑不同分值的权重

数据示例

student_id problem_id knowledge_id score max_score 得分率
S001 T3-1-1-E02 K3-1-1-02 8.0 10.0 80%
S001 T3-1-2-A01 K3-1-2-01 2.0 2.0 100%
S002 T3-1-1-E02 K3-1-1-02 6.0 10.0 60%

这样设计后,你的评分系统会更加准确和灵活。 [Timestamp: 2025/11/05 10:31:56]