We are designing a mobile app that will have a question and answer section, very similar to EE as a matter of fact.
I need some help with the database design.
I had something like this in mind, please don't laugh:
id | category_id | question_text | status_id | user_id | created_at | views |
id | question_id | answer_text |user_id | created_at | status
id | category_text | desc
id | status_text | desc
id | username | nickname
Of course the tables will have more fields, but that would be the general way I would do something like this.
The reason I am posting here is because the last time I showed a coworker my table design for a project similar to this, he damn near laughed. He explained to me somewhat, that I needed to use attributes and that by doing so all the related tables would be unnecessary.
But he didn't elaborate. Attributes? I think he meant like using JSON in the field values or something. At least, that's what I got out of his rambling.
So can someone show me a professional, clean, efficient, modern, and functional approach to the above table design? Can this be done by using JSON as data with field names, such as my coworker suggested ( again, I think ).
Thanks! Any example would help.