You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
1.1 KiB

CREATE CONSTRAINT IF NOT EXISTS FOR (kp:KnowledgePoint) REQUIRE kp.id IS UNIQUE;
CREATE CONSTRAINT IF NOT EXISTS FOR (ab:AbilityPoint) REQUIRE ab.id IS UNIQUE;
MERGE (kp1:KnowledgePoint {id: "KP_e99a18", name: "周长计算", level: "小学"});
MERGE (kp2:KnowledgePoint {id: "KP_5d4140", name: "图形拼接", level: "小学"});
MERGE (ab1:AbilityPoint {id: "AB_e99a18", name: "图形理解", category: "空间想象"});
MERGE (ab2:AbilityPoint {id: "AB_5d4140", name: "数学运算", category: "计算"});
MERGE (q:Question {id: "66c060a1", content: "通过7个小长方形拼成的大长方形的周长计算", difficulty: 2});
MATCH (q:Question {id: "66c060a1"}), (kp1:KnowledgePoint {id: "KP_e99a18"})
MERGE (q)-[:TESTS_KNOWLEDGE {weight: 0.8}]->(kp1);
MATCH (q:Question {id: "66c060a1"}), (kp2:KnowledgePoint {id: "KP_5d4140"})
MERGE (q)-[:TESTS_KNOWLEDGE {weight: 0.6}]->(kp2);
MATCH (q:Question {id: "66c060a1"}), (ab1:AbilityPoint {id: "AB_e99a18"})
MERGE (q)-[:REQUIRES_ABILITY {weight: 0.7}]->(ab1);
MATCH (q:Question {id: "66c060a1"}), (ab2:AbilityPoint {id: "AB_5d4140"})
MERGE (q)-[:REQUIRES_ABILITY {weight: 0.9}]->(ab2);