Solved

table vs subtable -- ASP.Net MVC 4 C# ?

Posted on 2013-06-25
1
590 Views
Last Modified: 2013-06-26
I need to allow users to create new COMMENTS,
but keep the old comments viewable in READ-ONLY mode.

Which option would you do and do you have any easy examples ?
 ** Option #1 - stored in MAIN table's Comments field
 ** Option #2 - stored in SUB table's Comments field,
                doing a LOOP to get all existing comments,
                then textbox so users can enter more
---------------------------------------------------
Steps
 1. click EDIT
 2. existing TableName.Comments text displays as below LABEL
       John Doe  6/1/13: This is test #1
       Jane Doe  6/3/13: This is test #2, line #1
                         This is test #2, line #2
 3. Bob Smith enters "This is test #3" into TableName.Comments TEXTBOX
 4. clicks SAVE
 5. below displays
       John Doe  6/1/13: This is test #1
       Jane Doe  6/3/13: This is test #2, line #1
                         This is test #2, line #2
       Bob Smith 6/7/13: This is test #3
0
Comment
Question by:finance_teacher
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 11

Accepted Solution

by:
lenordiste earned 500 total points
ID: 39275591
I would personally add a dedicated table for Comments with fields: commentId, author, dateStamp, comment, parentTopicId. Where parentTopicId is a reference to what may be your "MAIN" table. This way you don't have to mess up working with a big field of text and can easily identify the latest comment (sort by date!).
0

Featured Post

Business Impact of IT Communications

What are the business impacts of how well businesses communicate during an IT incident? Targeting, speed, and transparency all matter. Find out more in this infographic.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question