-
Notifications
You must be signed in to change notification settings - Fork 5
database design
Timothy Duffy edited this page Jun 29, 2014
·
4 revisions
Here are the different parts of the database:
Assignment
can be pushed by Moderators/Subscribers
Post
May be associated with an Assignemnt, or not
will have at least one media element
Media
Audio
Video
Picture
Text
users
name
id
Here are example responses/translations:
ASSIGNMENT RESPONSE
{
assignmentid : '',
publishdate : '',
expiredate : '',
question: [
{
'languagecode': 'en',
questiontext : ''
questiontype : ''
answer0 : '',
answer1 : '',
answer2 : '',
answer3 : '',
answer4 : '',
answer5 : '',
answer6 : '',
answer7 : '',
answer8 : '',
answer9 : '',
},
- or -
{
'languagecode': 'es',
questiontext : ''
questiontype : ''
answer0 : '',
answer1 : '',
answer2 : '',
answer3 : '',
answer4 : '',
answer5 : '',
answer6 : '',
answer7 : '',
answer8 : '',
answer9 : '',
},
- etc -
],
}
MEDIA UPLOAD
HTTP POST with the following fields:
mediafile, type: file
clientid, type: text
mediatype, type: text
where valid mediatypes are: 'text', 'audio', 'video', 'image'
HTTP POST Response JSON:
{
"mediaid": "72a93e71-5caf-49c8-80f6-7b3b91e2b5c8",
"success": true
}
USER POST
{
useruuid : '',
assignmentid : '',
postdatetime : '',
languagecode : '',
lat : '',
lng : '',
mediaids : {
'',
'',
'',
'',
'',
}
}
Here is the proposed listing of database tables for the yellr database:
assignments
assignmentid
userid
publishdate
expiredate
fencegeojson
questionassignments
questionassignmentid
assignemntid
questionid
languages
languageid
languagecode
languagename
questions
questionid
languageid
questiontext
questiontype
answer0
answer1
answer2
answer3
answer4
answer5
answer6
answer7
answer8
answer9
posts
postid
userid
assignmentid
postdatetime
languageid
reported
lat
lng
postmediaobjects
postmediaobjectid
postid
mediaobjectid
mediatypes
mediatypeid
mediatype
mediatypedescription
mediaobjects
mediaobjectid
mediatypeid
mediafilename
mediacaption
mediatext
clientlogs
clientlogid
userid
eventdatetime
eventtype
usertypes
usertypeid
usertypedescription
usertypevalue
users
userid
usertypeid
verified
uniqueid
firstname
lastname
email
passsalt
passhash
collectionposts
collectionpostid
collectionid
postid
collections
collectionid
userid
collectiondatetime
collectionname
collectiondescription