This is a migrated thread and some comments may be shown as answers.

Hypothetical situation - best method for maintaining a join table

2 Answers 26 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Boris
Top achievements
Rank 1
Boris asked on 05 Aug 2013, 12:45 PM
This is a rather vague question.  I have a classic join table situation.  I put a key from table A and a key from Table B in a join table.  The join table record either exists or it doesn't exist.  If it does exist another process selects the records from table A and B.  (This is a one to many situation.)

My concern is this.  I already have a working solution for this.  I have a popup in the screen for editing table A that creates/deletes join table records for a particular Table A record.  

The popup screen consists of a RadGrid with table B records and a checkbox for each record.  The grid loads from a view that loads all table B records and whether or not a join exists for them with Table A (to set the check boxes.)  Once displayed the users can check or uncheck boxes as they please.  When the Save button is hit, the codebehind adds/deletes join table records as needed. 

This works fine so far but I'm just wondering that if table B grows to some hundreds of records, this might become cumbersome.  I believe it would be simple to 'Ajaxify' the situation so that adds/deletes take place the instant the box is clicked but on the other hand I wonder if I need to maintain a user interface in which changes only take place as a whole.

Suggestions?

2 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 08 Aug 2013, 04:21 PM
Hi Boris,

As I understand you are adding all changes on Save button click as it happens when using Batch Editing functionality and you are wondering if you make ajax on each checkbox click instead would be better. I can not say which one is better for you, as this depends on the specific scenario. Therefore, you can try to use both of them and see which approach is more appropriate for your situation.

Regards,
Pavlina
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Boris
Top achievements
Rank 1
answered on 08 Aug 2013, 05:08 PM
Actually I'm wondering out loud if there are any other scenarios besides those two (Batch or Ajax) that I might have over-looked.

There's no 'right' or 'wrong' answer in this case.   Actually I suspect management will consider my current system 'good enough'.

:-)

But thanks.
Tags
General Discussions
Asked by
Boris
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Boris
Top achievements
Rank 1
Share this question
or