Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Neo4j data schema #36

Open
italopessoa opened this issue Mar 3, 2018 · 1 comment
Open

Create Neo4j data schema #36

italopessoa opened this issue Mar 3, 2018 · 1 comment

Comments

@italopessoa
Copy link
Owner

italopessoa commented Mar 3, 2018

schema

@italopessoa italopessoa added this to the Define new architecture milestone Mar 3, 2018
@italopessoa italopessoa self-assigned this Mar 3, 2018
@italopessoa
Copy link
Owner Author

italopessoa commented Mar 3, 2018

The nodes are configured as follows

{
  "nodes": {
    "question": {
      "title": "Question title",
      "incorrect_answers": [
        "Incorrect answer1",
        "Incorrect answer2"
      ],
      "correct_answer": "Correct answer",
      "title.pt": "Título da questão",
      "incorrect_answers.pt": [
        "Resposta incorreta 1",
        "Resposta incorreta 2"
      ],
      "correct_answer.pt": "Certa resposta",
      "uuid": "9374342-234234-234234"
    },
    "question_type": {
      "name": "Music",
      "name.pt": "Música",
      "uuid": "9374342-234234-234234"
    },
    "question_difficulty": {
      "name": "Hard",
      "name.pt": "Difícil",
      "uuid": "9374342-234234-234234"
    },
    "user": {
      "name": "Jhon",
      "uuid": "9374342-234234-234234"
    }
  },
  "relations": [
    {
      "key": "HAS_FAILED",
      "from": "user",
      "to": "question",
      "description": "When a user answers a question. Was it wrong or right? Which option was chosen? How many times was that option chosen?",
      "properties": [
        {
          "A": 0,
          "B": 0,
          "C": 0,
          "D": 0
        }
      ]
    },
    {
      "key": "HAS_SUCCEEDED",
      "from": "user",
      "to": "question",
      "description": "When a user answers a question. Was it wrong or right? Which option was chosen? How many times was that option chosen?",
      "properties": [
        {
          "A": 0,
          "B": 0,
          "C": 0,
          "D": 0
        }
      ]
    },
    {
      "key": "IS_FRIEND_OF",
      "from": "user",
      "to": "user"
    },
    {
      "key": "HAS_TYPE",
      "from": "question",
      "to": "question_type"
    },
    {
      "key": "HAS_DIFFICULTY",
      "from": "question",
      "to": "question_difficulty"
    }
  ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant