Database schema design and foreign keys in MySQL -


i'm trying create normalized database blog allowing reply comments. given few answers found, seems need @ adjacency list model , modified preorder tree traversal algorithm. however, after reading bit it, haven't found example of using foreign keys enforce data integrity. can done?

what database design recommend in case? ideally, i'd able eliminate parent comment, , using pk-fk relationships (pk = primary key, fk = foreign key) able eliminate child comments in order avoid keeping orphans in table.

update: clarification, i'd know database design used in blogs allow reply comments (that is, comments reply comment reply original thread).

reddits source code open source on github, see how it....


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -