Jump to content
biochar

need help understanding how to setup the tables

Recommended Posts

hello all,

 

this is probably a dumb question .. hope someone can help me understand how to do a user to user rating database where people can rate their transactions between them.

 

so far... i have 2 tables

 

user

-id   (INT)

-name    (VARCHAR)

-review_count   (INT)

 

review

-user_id   (INT)

-stars   (INT)

-text  (VARCHAR)

 

how do i distinguish who left the review for the person and vice versa since there is 1 user table. would i need to put a reviewer_id into the review table?

 

 

 

Share this post


Link to post
Share on other sites

the other person. it's for people swapping items.

IE
i'd review my transaction with you and vice versa

Edited by biochar

Share this post


Link to post
Share on other sites

So it is the transaction that is being reviewed. In which case there would be a transaction table too.

Share this post


Link to post
Share on other sites

if i click on a profile to leave a feedback

it would leave a feedback into that person's user_id, amount of stars and text.. do i need to add another column for reviewer_id? thats the part that is confusing me.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.