general architect question

Discussion in 'ASP .Net' started by =?Utf-8?B?Q2hyaXM=?=, Feb 13, 2005.

  1. In the database design I'm using a soft delete (a column flaged as IsDeleted)
    instead of a hard delete, what should you do if the item is deleted in one
    table yet you go a create a dropdownlist with a list of items and record you
    bring up has that soft deleted item so you try to "set" the selected vaue to
    it and it no longer is in the list since your sql statement looks for
    IsDeleted = 0? You'll get an error not in the list anymore (not an item in
    the list). You could Try/ Catch it. But is there a more common way to
    prevent/avoid this?

    Thanx.
     
    =?Utf-8?B?Q2hyaXM=?=, Feb 13, 2005
    #1
    1. Advertising

  2. =?Utf-8?B?Q2hyaXM=?=

    Steve Lutz Guest

    Chris,

    That's more of a User Interface issue. What do you want the user to see when
    they open a detail field, but the selected item has been "soft deleted"?
    What is the user expecting to see? It may lead you down the path of other
    issues to.

    Say for example, the database is a list of songs, and each song has a
    category, say Rock, Easy, Classical, etc. But then you soft deleted Rock, so
    that you could expand it to Hard Rock and Modern Rock. When a user looks at
    the song with the old Rock category, what do you expect them to see? You
    have the option of doing soft-cateogization as well - not using foreign
    keys.
    Just store the categorization value (string) into the field. But this leads
    to data-integrity issues.

    HTH

    Steve



    "Chris" <> wrote in message
    news:...
    > In the database design I'm using a soft delete (a column flaged as

    IsDeleted)
    > instead of a hard delete, what should you do if the item is deleted in one
    > table yet you go a create a dropdownlist with a list of items and record

    you
    > bring up has that soft deleted item so you try to "set" the selected vaue

    to
    > it and it no longer is in the list since your sql statement looks for
    > IsDeleted = 0? You'll get an error not in the list anymore (not an item in
    > the list). You could Try/ Catch it. But is there a more common way to
    > prevent/avoid this?
    >
    > Thanx.
     
    Steve Lutz, Feb 13, 2005
    #2
    1. Advertising

  3. exactly, the problem. I could adjust the presentation to detect that the item
    is no longer available, not adding or selecting it, or add the item back to
    the list. If I don't make it available then if the user saves the record it
    will change the value for that field. Now it could be a good thing, but also
    bad for history (reporting).

    I might just add it to the list again, making it selected for modifing that
    particulaer form data. Thought I'd ask if there was other approaches, thanx.

    "Steve Lutz" wrote:

    > Chris,
    >
    > That's more of a User Interface issue. What do you want the user to see when
    > they open a detail field, but the selected item has been "soft deleted"?
    > What is the user expecting to see? It may lead you down the path of other
    > issues to.
    >
    > Say for example, the database is a list of songs, and each song has a
    > category, say Rock, Easy, Classical, etc. But then you soft deleted Rock, so
    > that you could expand it to Hard Rock and Modern Rock. When a user looks at
    > the song with the old Rock category, what do you expect them to see? You
    > have the option of doing soft-cateogization as well - not using foreign
    > keys.
    > Just store the categorization value (string) into the field. But this leads
    > to data-integrity issues.
    >
    > HTH
    >
    > Steve
    >
    >
    >
    > "Chris" <> wrote in message
    > news:...
    > > In the database design I'm using a soft delete (a column flaged as

    > IsDeleted)
    > > instead of a hard delete, what should you do if the item is deleted in one
    > > table yet you go a create a dropdownlist with a list of items and record

    > you
    > > bring up has that soft deleted item so you try to "set" the selected vaue

    > to
    > > it and it no longer is in the list since your sql statement looks for
    > > IsDeleted = 0? You'll get an error not in the list anymore (not an item in
    > > the list). You could Try/ Catch it. But is there a more common way to
    > > prevent/avoid this?
    > >
    > > Thanx.

    >
    >
    >
     
    =?Utf-8?B?Q2hyaXM=?=, Feb 13, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ed Metcalfe

    Enterprise Architect - Visio??

    Ed Metcalfe, Sep 29, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    2,862
  2. Recruiter
    Replies:
    5
    Views:
    679
    Chris Lambert
    Jul 15, 2003
  3. Edward Micciulli
    Replies:
    0
    Views:
    389
    Edward Micciulli
    Aug 23, 2003
  4. Anil
    Replies:
    0
    Views:
    310
  5. Robin
    Replies:
    2
    Views:
    128
    richard
    Feb 23, 2011
Loading...

Share This Page