If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > comment table

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-28-10, 05:35
solomon13000 solomon13000 is offline
Registered User
 
Join Date: Oct 2006
Posts: 29
comment table

I came up with the database design for the comment table. Is this table considered to be good enough to handle a comment or can it be improved?. Please take note that the originatorId and recipientId is related to the memberId in the member table.
Attached Thumbnails
comment table-table.jpg  
Reply With Quote
  #2 (permalink)  
Old 01-28-10, 07:10
MarkATrombley MarkATrombley is offline
Registered User
 
Join Date: Jul 2009
Location: Michigan
Posts: 125
The ParentCommentID should be NULL for parent comments. Then you can remove the CommentType column: if the ParentCommentID is NULL then it is a parent, if not then it is a child.
Reply With Quote
  #3 (permalink)  
Old 01-28-10, 10:40
blindman blindman is offline
World Class Flame Warrior
 
Join Date: Jun 2003
Location: Ohio
Posts: 11,719
Yes, remove the CommentType column.
__________________
If it's not practically useful, then it's practically useless.

blindman
www.chess.com: "sqlblindman"
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On