Solved

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

Posted on 2013-06-25
1
582 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

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…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

734 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