Skip to content

Database Structure

marinah1 edited this page Mar 29, 2017 · 13 revisions

Database structuring (subject to rapidly change)
Reference to Structuring Data, Best practices: https://firebase.google.com/docs/database/web/structure-data

  • onlineChatSupport (to be decided)
  • Forum (to be decided; probably usage: imageGameObjects + forumMessage + voteUP/voteDOWN)
  • FAQs (FAQ Questions + Answers (text))
  • users (list of users)
    • aviral (userID and userName; repeated names will be assigned names like Aviral_1, Aviral_2 and so on)
      • palace_1(palaceID)
        • unusedGameObjects (list of gameObjects added via android/chrome extension)
        • placedGameObjects (list of gameObjects in user's saved game state)
          • uid (unique id of object)
            • position
              • x:1
              • y:3.5
              • z:401.7
            • rotation
              • x:0
              • y:0
              • z:8
            • typeId (type of object)
            • uid (appears again (redundant) since uid is public field and .jsonify() jsonifies all public fields - look into if can make this a protected field)
    • emre
      • palace_1
        • unusedGameObjects
        • placedGameObjects
          • uid (unique id of object)
            • position
              • x:1
              • y:3.5
              • z:401.7
            • rotation
              • x:0
              • y:0
              • z:8
            • typeId
            • uid
    • adam
      • palace_1
        • unusedGameObjects (empty because no imageGameObjects added yet)
        • placedGameObjects (empty palace)
  • publicGameObjects (list of gameObjects available to everyone)
    • apple (pre-existing)
    • banana (pre-existing)
    • banana_1 (pre-existing)
  • publicImageGameObjects (list of imageGameObjects added by users but available to everyone; need to decide more sematics)

Clone this wiki locally