Last post Sep 26, 2018 07:38 AM by eralper
Sep 17, 2018 01:03 AM|kmcnet|LINK
Hello everyone and thanks for your help in advance. I need to develop an application that will track children enrolled in a school. That part is simple enough, however I need a method to keep track if students are related, for example brother or sister.
I can think of different possibilities to handle this and I now much of this depends on the requirements of the application, but would appreciate some feedback from anyone who has encountered this requirement and how they handled it. I'm considering an approach
like https://stackoverflow.com/questions/7809421/identify-siblings-in-database, but am not sure there is a better way. Any help would be appreciated.
Sep 18, 2018 03:15 AM|Brando ZWZ|LINK
I'm considering an approach like https://stackoverflow.com/questions/7809421/identify-siblings-in-database, but am not sure there is a better way. Any help would be appreciated.
In my opinion, if you want to develop a database structure for related siblings, you should create a new relationship table.
If you want to insert the relationship into the Relationship table, you should insert two records.
Since if you don't insert two records, we may not select the relationship when you use where query.
Sep 23, 2018 03:23 AM|kmcnet|LINK
Thanks for the response. Please explain how you use ID1 and ID2. I understand using a relationship table, but am not following what you mean by the two records.
Sep 24, 2018 07:12 AM|Brando ZWZ|LINK
ID1 and ID2 are students id.
Sep 26, 2018 07:38 AM|eralper|LINK
Can you use GraphDB features of SQL Server 2017?