-
Notifications
You must be signed in to change notification settings - Fork 7
oral history data example
Aidan Farrell edited this page Mar 31, 2021
·
7 revisions
We'll use a straightforward way of representing the data in the database, This minimises the amount of validation that consumers of the data have to do,
Something to keep in mind is how the data is interpreted if the project spec changes. To deal with this, there is a "specs" array containing all the project specs from where the types from. (The array part is because it might be required to allow multiple "specs" to define differently namespace'd types.)
{
"_id": "44ebabfa7c9fd463be987bddac03b689", // Random ID generated by couchdb
"_rev": "1-4a635bb236beb2513c8939cc2dbbef79", // Revision ID generated by couchdb
"history": [
{
"person": "44ebabfa7c9fd463be987bddac02c946", // Id that is a 'foreign key' into the People database
"date": 1634705036 //Unix timestamp
}
]
// Refers to the project model database
"specs": [
{
"id": "44ebabfa7c9fd463be987bddac0430cf",
"rev": "1-c308fe8bd89786781164ff4ac1e39956"
}
],
// From this type, any client with the project model can deduce all the below types
// The oral history spec itself referrs to non-qualified names (i.e. they don't prefix with oral-history::)
// So let's have that be a file-specific thing: Files don't have to use prefixes to refer to names
// in their own file. Since this Datum isn't (and can't be) part of the oral-history spec file, it must namespace types
// from oral-history speci.
"type": "oral-history::Interview",
"data": {
// The interviewer happens to be the same user as the creator
"interviewer":{
"data": "44ebabfa7c9fd463be987bddac02c946",
"type": "Interviewer"
},
"location":{
"data": [-39.919023, 121.9012392], //Latitude & Longitude
"type": "Location"
},
"interview-start-time":{
"data": 1634703436, // Unix Timestamp
"type": "faims-core::DateTime"
},
"interview-end-time":{
"data": 1634704636, // Unix Timestamp
"type": "faims-core::DateTime"
},
// "recording" is an attachment of the same name.
// Since attachment names are URL encoded when used, they can contain any character, so there's no need for indirection.
"participant": {
"type": "Participant",
"data": {
"notes": {
"type": "faims-core::String",
"data": "Please follow up interview this person!"
},
"participant-details": {
"type": "ParticipantDetails",
"data": {
"name": {
"annotation": {
"type": "faims-core::String",
"data": "What a nice name"
},
"type": "faims-core::String",
"data": "John A. Smith"
},
"gender": {
"type": "faims-core::String",
"data": "male"
},
// "consent-form" is an attachment of the same name.
"consent-form": {
"type": "faims-attach::ConsentForm"
}
}
},
"interview-qa": {
"type": "InterviewQA",
"data": {
"mother": {
"type": "MotherDetails",
"data": {
"birth-region": {
"type": "BirthRegion",
"data": "Macedonia"
},
"birth-village": {
"type": "faims-core::String",
"data": "Vatolakkos"
},
"did-migrate": {
"type": "DidMigrate",
"data": "MIGRATED"
},
"migration-time": {
"type": "faims-core::String",
"data": "1985"
},
"occupation": {
"type": "faims-core::String",
"data": "Shop Owner"
},
"had-occupation": {
"type": "HadOccupation",
"data": "HAD_OCCUPATION"
}
}
},
"father": {
"type": "FatherDetails",
"data": {
"birth-region": {
"type": "BirthRegion",
"data": "Peloponnese"
},
"birth-village": {
"type": "faims-core::String",
"data": "Alykes"
},
// MIGRATED is a possible value, but "DIDN'T MIGRATE" isn't, nor is null specifically.
// Perhaps we should have a "required" boolean in the project specs
"did-migrate": {
"type": "DidMigrate",
"data": null
},
"migration-time": {
"type": "faims-core::String",
"data": null
},
"occupation": {
"type": "faims-core::String",
"data": "Unemployed"
}
},
"certainty": {
"type": "faims-core::Number",
"data": 0.7
}
},
"parent-location": {
"type": "ParentLocation",
"data": {
"state": {
"type": "State",
"data": "New South Wales"
},
"city": {
"type": "faims-core::String",
"data": "Sydney"
}
}
},
"birth-location": {
"type": "BirthLocation",
"data": {
"state": {
"type": "State",
"data": "Western Australia"
},
"city": {
"type": "faims-core::String",
"data": "Perth"
}
}
},
"education": {
"type": "Education",
"data": {
"school-state": {
"type": "State",
"data": "New South Wales"
},
"school-city": {
"type": "faims-core::String",
"data": "Sydney"
},
"university": {
"type": "faims-core::String",
"data": "University of Technology, Sydney"
}
}
},
"occupation": {
"type": "faims-core::String",
"data": "Teacher"
},
"discrimination": {
"type": "Discrimination",
"data": "Yes"
}
}
}
}
}
},
}