Skip to content

Database Schema

urvi-p edited this page Apr 9, 2021 · 6 revisions

Hierarchy

Documents live in collections, data lives in documents, collections can also live in documents

Collection: Users

Documents: user_001

Data: first : "Ada" last : "Lovelace" born : 1815

Data Model Data Types Data Structure

Experiments (Collection)

Structure

  • Exp_ID (Document) description(String), experimenters(ArrayList), isEnded(Boolean), isGeolocationRequired(Boolean), isPublished(Boolean), minTrials(Integer), numOfQuestions(Integer), numOfTrials(Integer), owner(String), type(String), region(String), rules(String), type(String)
    • Questions (Collection)
      • Question_ID (Document) countTrials(Integer), isIgnored(Boolean)
        • Replies (Collection)
          • Reply_ID (Document) reply(String)
    • Trial (Collection)
      • Trial_ID (Document) date(Date), experimenterID(String), geolocation([latitude and longitude]), result(String)

Usage

  • exp_001 500, 3, John, Binomial, Pass or Fail, False
    • Experimenters
      • user_001 20, False
        • Trial
          • trial_001 2016-09-20 09:34:00, 53.52667785793429, -113.52644318267107 | Edmonton

Users (Collection)

Structure

  • User_ID (Document) mySubscriptions(ArrayList), numOfMyExp(Integer), phoneNumber(Integer), userEmail(String), userName(String)
Clone this wiki locally