Can anyone please explain to me what it means to self-reference a table and why we do so. Whats the point of self referencing a table ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Can you imagine an instance where there are gym member in a database. Some of the people are only gym members, while some people are gym members AND coaches.
So if in the database, there is a column for each member’s coach’s memberId, then the database will self reference itself when you use a memberId that is already in the database as the coach. That is a use of self-referencing.