Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.databases.ms-sqlserver    |    Notorious Rube Goldberg contraption    |    19,505 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 18,170 of 19,505    |
|    Bob Barrows to andrew    |
|    Re: Should I split the record?    |
|    26 Mar 11 22:55:57    |
      From: reb01501@NOSPAMyahoo.com              andrew wrote:       > Hello all,       >       > This is a newbie design question. I have a table with the following       > fields       > TABLE A       > ID, Prop1, Prop2       >       > I expect that I might have multiple concurrent users accessing the       > same record (in a recordset via SELECT). If I expect to have users       > modify either Prop1 or (XOR) Prop2 I should also expect the DB to       > complain since one of the users would have the record locked (I'm       > learning lots about locks). Would that complaint be an ADO exception       > or would the locked out user just wait for the record to be free?              It depends - if you are using a cursor to do the update, whether you open it       with optimistic or pessimistic locking will be the determining factor. If       you are not useing cursors (rcordsets) to perform the updates, then the       database will control the transactions so that the first one will be done,       followed by the second.              > Would a better design for this scenario be       > TABLE A       > ID, Prop1       >       > TABLE B       > ID, Prop2       >       > this way the users would not interfere?       >       No, the best design would be a single table with ID, PropType (1 or 2) and       Prop. Data (the "1" and "2") should be stored as data (in rows) not in       metadata (table.column names)              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca