File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Please Suggest a design approach for update operations

 
shukla raghav
Ranch Hand
Posts: 203
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Consider there is a library application. The user may select and edit the book details. There are 25 fields defined for each book. A user modifies one or two fields (say Book Edition and Publishing date) and saves the edited book details. Now in my Data Access Layer should i try to identify the changed data and just update the fields that have been changed

Update BookDetails
Set edition = '2010',
publisher = 'Prentice Hall'
where isbn = '96X31511134C'

or

simply try and update all fields in the database

Update BookDetails
Set
title = "Some Title"
author = "Some Author"
edition = '2010',
publisher = 'Prentice Hall'
language = 'Eng(US)'
.
.
.
. set all 24 fields
where isbn = '96X31511134C'


For the first i need to do some more work at all layers and UI also to identify the list of field that have changed. Which is usually a more sensible approach.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic