I want to think of a way to display and query comments.
Each comment can have children and siblings. I would like to display 40 comments in a page. However, I would like to show all the children. The problem here is if a child has more then 40 comments beneath it this will not work out. Also, I have no idea how I might get the comments. I could query all comments that belong to media.id and build a tree based on its viewpoint, but wouldn't parsing and traversing all of that take time? I am not sure what's the best method of doing this.
The comments table looks like:
public class comment
{
public PK id;
public media media;
public comment parent;
public user_data author;
public DateTime date;
public string text;
public Flags flags;
}