> I might have failed to understand your solution. But what I mean by
external
> systems is that I can't expect those to use this flag and so when my
system
> is updated externally I will be forced to update the whole object -
> regardless of the changes made in it. With other clients I will have to
make
> sure each is using this flag correctly.
not know of it's presence. Your object manages it internally - data
encapsulation. For example, whenever a property is changed on your object
flag to true. Didn't mean to go off on a tangent, but just wanted to give
Just wanted to ensure you were aware of its existence. It might not
"gwenda" <gwenda@discussions.microsoft.com> wrote in message
news:69BCE50C-32FC-4E7C-8A23-67A3BEA65A8C@microsoft.com...
> Hi Sam,
> > The "dirty" flag would not be visible to any external systems or clients
of
> > your objects. The flag would purely be an internally managed state
> > mechanism.
>
> I might have failed to understand your solution. But what I mean by
external
> systems is that I can't expect those to use this flag and so when my
system
> is updated externally I will be forced to update the whole object -
> regardless of the changes made in it. With other clients I will have to
make
> sure each is using this flag correctly.
>
> > Are you saving the entire collection in the DB as an XML string? I
thought
> > these collections were discrete objects where each object would have to
be
> > saved in the DB if modified.
>
> I don't keep them as xml in the DB. I intend to use SQL server 2000
> sp_xml_preparedocument to convert the string back to XML and then use the
> OPENXML command and a temporary table to read the data from the xml and
> update whatever needed to be updated.
>
> >Concurrency is always an issue and should be
> > dealt with by the data layer - never update the DB if the object to be
saved
> > has stale data. If you have dealt with concurrency properly, then
whether
> > or not you update all fields in a row or just a subset of fields in a
row
> > becomes purely a performance issue and not a data integrity issue.
>
> Sorry. I use the term concurrency too broadly. What I meant is that wiping
> all current data in favor of the new data chunk have caused me, in the
past,
> to lose data - especially in scenarios of business rules which rely on
> certain date-time data. I'm sure it could have been avoided but it still
> feels wrong to do so.
>
> > Have you seen this application block on MSDN:
> >
> > Data Access Application Block
> >
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/daab-rm.asp
>
> Sure - I've worked before with its former version and intend to use it in
> the current solution too. As far as I recall, this block does not provide
> answers to my question - or am I wrong?
>
>
> Thanks,
> Gwenda
>
> "Sam Santiago" wrote:
>
> > > Although the "dirty" flag is a possibility, it is a "dirty" one. :-)
And
> > in
> > > case of external systems/other UI that will update my system, I will
have
> > to
> > > make sure that the flags were used.
> >
> > The "dirty" flag would not be visible to any external systems or clients
of
> > your objects. The flag would purely be an internally managed state
> > mechanism.
> >
> > > The collections can be serialized to XML strings and sent to the DB
as
> > such.
> >
> > Are you saving the entire collection in the DB as an XML string? I
thought
> > these collections were discrete objects where each object would have to
be
> > saved in the DB if modified. Concurrency is always an issue and should
be
> > dealt with by the data layer - never update the DB if the object to be
saved
> > has stale data. If you have dealt with concurrency properly, then
whether
> > or not you update all fields in a row or just a subset of fields in a
row
> > becomes purely a performance issue and not a data integrity issue.
> >
> >
> > Thanks,
> >
> > Sam
> >
> >
> > --
> > _______________________________
> > Sam Santiago
> > ssantiago@n0spam-SoftiTechture.com
> >
http://www.SoftiTechture.com > > _______________________________
> > "gwenda" <gwenda@discussions.microsoft.com> wrote in message
> > news:8DA59B37-5648-45EE-B875-18B2BA3FB552@microsoft.com...
> > > Hi Sam,
> > >
> > > Thanks for your answer. There are few points I would like to point out
> > > regarding your answer:
> > >
> > > Generally, I intend to update all the properties of any object.
However, I
> > > don't want to update (if I don't have to) two types of properties:
> > >
> > > Collections -usually contains other objects. I would like to
> > > insert/update/delete only the objects in the collection that were
modified
> > by
> > > the client. Some of my objects contain rather large collections and
some
> > may
> > > contain more than one property which is a collection.
> > >
> > > Large sub-objects - that is an object which is contained in the main
> > object
> > > and is large enough to reconsider updating it for no reason.
> > >
> > > Performance is indeed a consideration but another motive was the DB
> > > concurrency. Naturally those sub-objects and collections usually
reside in
> > > other tables in the DB and may have been modified but other users.
> > Although I
> > > have a mechanism to prevent it, I've learned that those big updates
which
> > > wipe everything an re-insert new date usually turn to be messy.
> > >
> > > Although the "dirty" flag is a possibility, it is a "dirty" one. :-)
And
> > in
> > > case of external systems/other UI that will update my system, I will
have
> > to
> > > make sure that the flags were used.
> > >
> > > I was thinking about having my business component in the middle tier
> > > comparing the cached object with the modified object. According to the
> > > comparison results the relevant main-object and/or sub-objects and/or
> > > collections objects will be sent to the data layer components. The
> > > collections can be serialized to XML strings and sent to the DB as
such.
> > But
> > > this seems like a complex solution to what I imagined should be quite