Page 1 of 1

Some unclear questions about db construction

Posted: Wed Jan 01, 2014 11:41 am
by bagi
1) i have feedbacks on the site. Should I dublicate information: i have itemId column (item id on which is written a feedback). Using it I can find out a seller. Should i create each one column for a seller or i need to find out it every time using itemId?

2) I have soldItems table. Inside contains information about purchases. A seller and for a buyer has some operations (deleting, archiving of a purchase, ect). How i can organise that? Should i dublicate records for a seller and for a buyer (and mark every time a record as archived, deleted ect) or i should choice an another way? For example, two columns for buyer's status and seller's status

Re: Some unclear questions about db construction

Posted: Wed Jan 01, 2014 11:46 am
by Celauran
Don't duplicate information. Use foreign keys and joins.

Re: Some unclear questions about db construction

Posted: Wed Jan 01, 2014 12:26 pm
by bagi
Yes, thanks. What about second question?

Re: Some unclear questions about db construction

Posted: Wed Jan 01, 2014 12:58 pm
by Celauran
Your second question isn't terribly clear. I still maintain that you don't want to duplicate data. Could you please elaborate on the question/problem at hand and maybe provide the table structure for clarity?

Re: Some unclear questions about db construction

Posted: Wed Jan 01, 2014 1:22 pm
by bagi
See, A buyer and a seller will interact with thier purchases, right? I wanna give him some opportunities (moving to archive, to trash and ect). But i need to store those statuses anywhere. How?
1) Create double records for a seller and for a buyer where everyone may interact as he want.
2) Create columns sellerStatus and buyerStatus