I’m showing a Logical Model, and not the Physical Model.
does it matter which of them does the requesting?
I don’t follow you?!
Just like in real life, on person would initiate the request (“Hey, would you like to be my friend?”) and the other person would respond to the request (“Sure, I’d like that!”/“No way, you loser?!”)
I am calling the person who initiates the Friend Request as the “Requestor” and the person receiving the Friend Request as the “Requestee”.
Both people would presumably come from my “User” table.
I suppose two people could simultaneously, but independently make similar requests.
Is that what you meant?
does it matter when this happened?
If a “requestee” doesn’t respond “Yay/Nay” in a certain period of time, I suppose the “request” should expire…
if so, how do you plan to show that on your site? (you say you want to mimic what other forums do, well, i’ve never seen this)
Well, what does SitePoint do?
Lemme describe in words how I envision things working…
Person A and Person B talk and hit it off in the Forums and via PM’s. Person A sends Person B a “Friend Request” which creates a record in the “friend” table linking these two people. By default Person A has “accepted” his/her request since he/she made it?! The “Friendship” would not become effective until Person B also “accepts” the request. At that time you have a completed “Friendship”.
If the “Friendship Request” is not responded to by both parties in 14 days then it “expires” and while the request may persist in the database, it is no longer valid.
After a “Friendship” has been created, at anytime in the future, either party (i.e. “Requestor” or “Requestee”) can end the relationship. (No lawyers or judge is required!!) In this case, either “Friend” would go into his/her “Friend List” and click on something which changes the “Friendship Status” from “accepted” to “declined”, at which point things end. (Presumably once a “Friendship Request” is made, the record always exists, but the record can “expire” as described before, OR it can become “inactive” - and therefore not restorable.
Whew!! I feel like I just described the final project in a PHP class?!
Maybe I am making things too intricate or complicated, but that is sorta hat I am shooting for, and I believe it is pretty close to how SitePoint does things…
Thanks,
Debbie