Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Friendster/degrees of seperation SQL

Author  Topic 

TurdSpatulaWarrior
Starting Member

36 Posts

Posted - 2004-02-23 : 10:57:54
Are any of you familiar with friendster.com or other similar social networking type sites? I was wondering how the SQL looks for a site like that where you can view someone's profile, and if will show you how you are connected to a person. For example, if i was looking at a lass named Diana, it might show something like:

Me > Adam > Barbara > Chad > Diana

I assume they are using a normalized database system (can't even imagine how you could do otherwise with something like this). Do you reckon they attempt joins on the table until one returns a result?

I am faced with the daunting task of setting up something similar in concept to the degrees of separation type concept, however the relationship needs to appear inline with search results, like these imaginary results:


4 results found

Abe - bla bla bla words
Abe > Becky > You

Bob_Dole - bla bla bla words
Bob_Dole > Curtis > Dan > You

Catherine - bla bla bla words
Catherine > You

Dean - bla bla bla words
Dean > Edward > Francis > Gort > You


Anyone worked with a similar type system? This is going to be used to basically find the shortest fulfilment path for acquiring a product, however the concept and logic behind it is 99% identical in this case. Some places are affiliated with others and will relay said product(s), others will not.

ehorn
Master Smack Fu Yak Hacker

1632 Posts

Posted - 2004-02-23 : 13:58:27
Have a look at BOL: expanding networks
Go to Top of Page

TurdSpatulaWarrior
Starting Member

36 Posts

Posted - 2004-02-23 : 14:38:42
Excellent information. I had no clue what the official term for this type of relationship is called. Thank you much horn.
Go to Top of Page
   

- Advertisement -