Link to home
Start Free TrialLog in
Avatar of developingprogrammer
developingprogrammer

asked on

default record locking vs open dabases by using record-level locking

guys, what's the difference between these 2 options?

they seem to contradict.

so i put default record locking = no locks.

then right below it says open databases by using record-level locking.

isn't it an oxymoron in its more quintessential sense?

User generated image
ASKER CERTIFIED SOLUTION
Avatar of Jim Dettman (EE MVE)
Jim Dettman (EE MVE)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of developingprogrammer
developingprogrammer

ASKER

whao, beautifully explained Jim!!

i see, so there are 2 concepts which sound the same. 1) record locking, 2) record-level locking

record locking:
no lock is optimistic locking
edited record is pessimistic locking
--------->all records<--------- what is this Jim? does it mean it locks all the records in the entire table?

record-level locking
page LEVEL locking locks 1 page of data - for access 2007 it's 4kB of data (cause unicode now)
record LEVEL locking is just the size of the record - however much space it takes up, no more no less.

this is correct Jim?

seems like microsoft used pretty obfuscating language with no easily referenceable documentation to expound on their parlance
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Everyone believes it literially means no locking, but of course with any DBMS, that's impossible.

whao Jim! ok i know it's a silly comment from me, but previously i wasn't clear that ALL DMSes needs locks. but now i've learnt! = )

By adding enough text fields (filled, because their stored variable length),

ah! this is one thing that gets me - some tutorials i've watched recommend setting field size to just as much as you need. but i always thought that the text field is a variable length field - cause text is actually a concatenation of char right(?), so why do we need to determine field size?
User generated imageor is the Text datatype fixed length and the memo datatype variable length?

Jim how do you know how much space a particular record is taking up?

and also Jim, i'm so sorry that i'm missing the point, but record level locking vs page level locking - if we fill up the record until it is just more than half the page - what's the benefit of that? it essentially becomes page level locking right?

what i'm thinking for the reason why you want to fill up the record till just more than half a page is if we want to implement record level locking and some problem tables have something we need to adjust, then we need to fill those records to > half a page. something along those lines. is that correct?

thanks so much for your help Jim!! = ))
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
whao Jim, that was beautifully explained. = )

just a small typo that would confuse fellow beginners like me:
The difference is text is limited to 255 max and is stored with the reset of the record.

i believe you meant rest of the record. i saw stumped for awhile but figured it out. i'm sure there are others out there who are slightly greener than me so probably this would help! = )

Jim one last thing, could you share with me how to add up the field sizes with overhead? perhaps with an example if that's not too much to ask? thanks!! = ))
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
whao fantastic Jim! thanks for all the help you've given me for this question - and all the other ones as well! = ))