I\'m a newbie to SQL and I\'m jumping in head first trying to learn as much as possible as I\'m coding, which is difficult as I\'m designing the database I\'ll have to live
A single linking table suffices, like so:
People( PersonId bigint, Name nvarchar, etc )
Friends( FromPersonId bigint, ToPersonId bigint, DateAdded datetime )
Example queries:
SELECT
People.Name
FROM
Friends
INNER JOIN People ON Friends.FromPersonId = People.PersonId
WHERE
Friends.ToPersonId = @myPersonId
SELECT
People.Name
FROM
Friends
INNER JOIN People ON Friends.FromPersonId = People.PersonId
WHERE
Friends.ToPersonId = @myPersonId
AND
Friends.DateAdded >= @startDate
AND
Friends.DateAdded <= @endDate