All Comments
TopTalkedBooks posted at August 20, 2017

Adjacent list models are very difficult to deal with. The company I am with now uses them for hierarchies and it causes great headaches. I have successfully used Celko's nested set models for prior employers and they work great for creating, maintaining and using hierarchies (trees).

I found this link which describes them: http://www.intelligententerprise.com/001020/celko.jhtml

But I would also recommend the book "SQL for Smarties: Advanced SQL Programming" written by Joe Celko and covers nested sets.

Joe Celko's SQL for Smarties: Advanced SQL Programming

Joe Celko's Trees and Hierarchies in SQL for Smarties

TopTalkedBooks posted at August 20, 2017

Joe Celko's SQL Puzzles and Answers and SQL for Smarties are the two best generic SQL books out there. Both are great sources to give you ideas for that tricky problem you used to think you needed a cursor or some client library to accomplish. For any truly interested SQL geek, these book are also pretty good for casual reading rather than as a mere desk reference. Two thumbs up.

TopTalkedBooks posted at August 20, 2017

It's a question of normalization. IMHO one of the best books on this subject is Joe Celko's SQL for Smarties. Basically, you avoid what are called "anomalies". In your example, if I delete all the questions with the "Java" tag, I would never be able to know that I ever had a tag called "Java" (delete anomaly). It's also important to crack out the table because you need the xref table to describe properties of the relationship between the principals.

Top Books
We collected top books from hacker news, stack overflow, Reddit, which are recommended by amazing people.