📞 0339-0387701 (WhatsApp) Contact

« Back to Database & Data Handling (NCCIA)

In a forum, a Reply that answers another Post is modelled how?

A. By a ParentPostID foreign key in Post referencing PostID in the same Post table ✅
B. By a separate Reply table with no link
C. By a foreign key to the User table only
D. By storing the reply text in the User table

Correct Answer: A. By a ParentPostID foreign key in Post referencing PostID in the same Post table

Explanation

Threaded replies form a hierarchy within one table, so a reply points to its parent post in the same table.