Skip to content
Sushant Mimani edited this page Jul 12, 2017 · 5 revisions

Design



Table: users.

id: (Integer), Primary ID.

username: (String) username.

email: (String) Email address.

password: (String) Hashed password.

createdDate: (DateTime) Date account was created.

credits: (Integer) User credits/ up votes.

gender: (Integer) references the gender table.

expertUser: (Boolean) Specifies if user is an expert user or not.



Table: questions.

id: (Integer), Primary ID.

userId: (Integer) ID of the user who added this question.

title: (String) Title of the question.

createdDate: (DateTime) Date question was created.

category: (String) Category to which the question belongs

updatedDate: (DateTime) Date question was modified.

is_anonymous: (Tiny Integer) of 1 or 0. If value equals '1' question is added anonymously, if '0' it's not anonymous. By default 0 is the value if none specified.



Table: answers.

id: (Integer), Primary ID.

userId: (Integer) ID of the user who added this question.

answerText: (String) Title of the question.

createdDate: (DateTime) Date question was created.

updatedDate: (DateTime) Date question was modified.

is_anonymous: (Tiny Integer) of 1 or 0. If value equals '1' question is added anonymously, if '0' it's not anonymous. By default 0 is the value if none specified.



Table: category.

id: (Integer), Primary ID.

category: (String) Denotes the category of questions



Table: gender.

id: (Integer), Primary ID.

gender: (String) Denotes the gender

Clone this wiki locally