-
Notifications
You must be signed in to change notification settings - Fork 7
MongoDB Schema
key1: string (or number),
key2: string (or number),
... (other keys)
info: json (everything else)
The fields needed to identify a record/document will be defined explicitly (key1, key2, ...), everything else goes into ‘info’ json object, which can change over time and be as detailed as we want.
id: string (or number)
email: string
info: json
‘id’ and ‘email’ can be the two keys (used to identify user), and all the other information from google+ (name, image, etc.) goes into ‘Info’.
id: string (or number),
... (any other key(s) used to identify a session)
info: json
id: string (or number)
... (any other key(s) used to identify an action or node)
info: json
{
id: string (or number)
email: string
info: json // other user information
sessions: [
{
id: session1
info: json // other session information
nodes: [
{
id: node1
info: json // other node information
}
{
id: node2
info: json
}
...
]
}
{
id: session2
info: json
nodes: [
...
]
}
...
]
}
Fields to Record:
UserRecord:
- UserID
- Email Address
- CreatedOn
SessionRecord:
- SessionID
- CreatedOn
ActionRecord:
- Tab ID
- URL
- Type
- Time
- EndTime
- Favicon
- Image
- Seen
Proposed Schema:
{
_id: UserID
fullname: UserName,
email: EmailAddress,
createdOn: AccountCreateDate,
sessions: [
{
sid: SessionId,
dateCreated: DATE_TIME,
tabid: TabID,
url: TabUrl,
type: TabType,
startTime: StartTime,
endTime: EndTime,
favicon: FaviconURL,
image: FeaturedImage,
seen: SeenRecord
},
{
sid: SessionId,
dateCreated: DATE_TIME,
tabid: TabID,
url: TabUrl,
type: TabType,
startTime: StartTime,
endTime: EndTime,
favicon: FaviconURL,
image: FeaturedImage,
seen: SeenRecord
},
]
}
Reference Learning: https://www.tutorialspoint.com/mongodb/mongodb_data_modeling.htm https://docs.mongodb.com/manual/applications/data-models/
Missing Features for Online Study
Behaviour: Node and Edge Creation
Testing and Behaviour Driven Development (BDD)
Video: Testing with Jasmine and Sinon-Chrome
Video: overview of SenseMap code
Video: browser features in the old 'master' branch
How browserProvenance.js works
Video: create REST API for MongoDB using Node.js