-
Notifications
You must be signed in to change notification settings - Fork 0
Database Design
sterlingalexander edited this page Sep 19, 2011
·
2 revisions
My first thoughts on the design of the database. I went through the specs and I think I covered everything we need for the functions necessary. There may be some unnecessary things, such as keeping password hashes (if there is a authentication gem we can use). Also, I starred any fields that would be calculated for performance reasons (many more views of vote counts than updates would be worth the slight denormalization and upkeep).
- user_id
- first_name
- last_name
- email_address
- password_hash
- post_id
- post_text
- creation_user_id (FK)
- vote_count (*)
- creation_date_time
- post_id (FK)
- user_id (FK)
- reply_id
- post_id (FK)
- creation_user_id (FK)
- reply_text
- creation_date_time
- vote_count (*)
- reply_id (FK)
- user_id (FK)
- admin_id
- user_id (FK)