choice 1: coments //replyto is going to be null on many posts
choice 2: comments replies
It appears just like a matter of preference instead of linear benefit analysis right now.
The very first option appears like an easy one, but however , you are creating a tree-structure in SQL.
and SQL doesn't support hierarchical data.
Not suggested - ever
TABLE comment ------------- id unsigned integer auto_increment primary key, reply_to unsigned integer, comment text, foreign key FK_comment_reply_to(reply_to) references comment.id ON UPDATE CASCADE ON DELETE CASCADE
Suggested - if you prefer a tree 2 levels deep
Should you construct it using 2 tables
TABLE main_post ---------------- id unsigned integer auto_increment primary key, body text, TABLE reply ------------- id unsigned integer auto_increment primary key, reply_to unsigned integer, body text, foreign key FK_reply_reply_to(reply_to) references main_post.id ON UPDATE CASCADE ON DELETE CASCADE
Then you're creating a easier structure that may be easily queried in SQL since the tree is just 1 level deep.
Because of this I'd recommend choice number two.
Options for much deeper trees
If you prefer a hierarchical structure I'd take a look at nested sets insteads, see: