title: SQL Database Recursive Relationship
body: <p>So I’m attempting to teach myself databases and SQL, and I’m trying to play around with making a database in management studio, and I have a question regarding recursive relationships in a table. Say I have a table called ‘Customers’ and in that table I have an int called Customer_ID as the primary key that is also an identity incrementing by 1, an nchar(125) called ‘Customer_Name’, and another int called Customer_Parent_ID (I don’t know whether I should make this an identity or not). How do I go about forming the relationships that there are customers, and I want to track that some of those customers may be parents of other customers (Think of companies, for example say both Microsoft and LinkedIn are customers, but Microsoft is also LinkedIn’s parent company and I want to show that relationship). I attached a picture of what I THINK it should look like… but again, total newbie here and any recommendations would be much appreciated. </p>
  
  <p>Thank you so much!</p>
  
  <p><a href="https://i.stack.imgur.com/9RRga.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9RRga.png" alt="enter image description here"></a></p>
  
  <p>EDIT: Added SQL Code and removed accidental mysql tag. </p>
  
  <p><a href="https://i.stack.imgur.com/Dz7EA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Dz7EA.png" alt="enter image description here"></a></p>