I am planning to build a live audience interaction webapp similar to Slido as practice/fun project.
User groups: admins and anonymous users
Admins:
login
create event (define event period and unique event code/name)
edit/delete user questions
highlight user questions (up to 3 questions per event)
Anonymous users:
join event by keying in event code/name
join event if event period matches current time
ask questions in the event page
see live updates of questions asked by other users
sort questions asked by time/most upvote
can upvote/downvote other questions
For such an application, will NoSQL or SQL db be a better choice?
Thanks in advance for your advices.
Updates!
Below are the data models for relational and non-relational scheme that i came up with. would love to have feedback on it:
Relational scheme:
Admins
id (serial primary key)
login
password
name
Events
id (serial primary key)
event_name
event_code
start_time
end_time
admin_id (foreign key reference admin.id)
Users
id (serial primary key)
name
email
Questions
id (serial primary key)
event_id (foreign key reference events.id)
post_time
user_id (foreign key reference users.id)
content
Question_upvote
id (serial primary key)
question_id (foreign key reference questions.id)
user_id (foreign key reference users.id)
Question_highlight (used by admins)
id (serial primary key)
question_id (foreign key reference questions.id)
Non-relational scheme:
Admins document
{
uid:
login:
password:
name:
events: [event1, event2 ...]
}
Events document
{
uid:
eventName:
eventCode:
startTime:
endTime:
adminId:
users: [user1, user2, ...]
highlightedQuestions: [question1, question2, ...]
}
Questions document
{
uid:
eventId:
userId:
content:
userLikes: [user1, user2, ...]
postTime:
}
Users document
{
uid:
name:
email:
}