Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

database schema #5

Open
emanKhaledh opened this issue Jul 23, 2018 · 2 comments
Open

database schema #5

emanKhaledh opened this issue Jul 23, 2018 · 2 comments
Assignees

Comments

@emanKhaledh
Copy link
Contributor

37638170_1802611913151665_3183800900804149248_n

@emanKhaledh emanKhaledh self-assigned this Jul 25, 2018
@akre54
Copy link

akre54 commented Jul 26, 2018

Hey! Schema looks great so far. It looks like you really get how to design a relational database.

Couple quick nits: you have a typo in your discussions schema -- "massage" should be "message" (unless you're talking about a back rub!) and I'm curious why age is a date? Shouldn't the field store date of birth instead, so you can subtract today's date from their date of birth and get their age? That way you don't need to update the table every time they get a year older.

Also, I'm wondering why state and role are both tables, since it seems like their only use is to map an id to a string representation. I think you might want to use an enum instead.

And lastly, you should never store the password in plain text. The best practice these days is to store a hash of the password with a "salt", or better yet use an authentication library like Passport to handle users logging in and out. Let me know if you need help with this.

Otherwise looks great! Looking forward to see where you take this.

@emanKhaledh
Copy link
Contributor Author

we use state table coz. the connection between two persons maybe accept or reject or suspend this insert in state table and state-id in connection table ,Well we will use enum
and age we mean date of birth i will change to Date of birth
and password we will deal with that .
after repair we push scheme to take feedback from you 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants