Tech Off Post

Single Post Permalink

View Thread: Question about EF
  • User profile image

    @JohnAskew: Here's an example from our system:

    PK = Master Analysis # (references other table), Piece Analysis #, and Effective Date

    The analysis numbers are just generated IDs, but the effective date is chosen by the user setting up the analysis. Let's say they enter a date of November 15th, but it was supposed to be October 15th. With EF, they would have to remove the analysis and re-add it with the correct date.

    Concurrency is not an issue because the row is locked in the database (another questionable choice, but it works for the limited cases where concurrency is an issue).

    Could we have designed the table with an "id" column as the primary key and the set the three columns as a unique key? Sure, but most times the effective date is not changing.