0

I am working a program in C# in a Visual Studio development, as a base, I am using SQL Server 2016.

My problem is that I can't determine who is related to whom using the ID of each member.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Balsa
  • 1
  • Hi, could you provide us with some more information? What is the project in question? What is the database schema? Could you clarify your question a bit more? – mzdv Jul 09 '20 at 12:16

1 Answers1

1

I assume you have some kind of a Person table. You would implement a mapping table storing all the relationships between two persons (and the type of the relationship).

The table could look like this:

Id; PersonId; RelatedPersonId; RelationshipType(Id)
deralbert
  • 856
  • 2
  • 15
  • 33
Random12b3
  • 159
  • 7