I can understand your frustration. Databases like MySql,SQL server etc. don't have the need to lock records in order to insert or update data.BeGeS wrote: ↑Tue Aug 22, 2017 2:38 pm I do not understand anything.
Regardless of the language or database type, a record must be blocked for modification. Otherwise, two users could modify it at the same time and the data of the last one would save the record.
And blocking the whole database to add a phone number, for example, seems excessive.
And you wouldn't want to do that to be honest unless we are talking about some very niche situations. Using an autoincrement field as your primary key in sql makes sure you do not have duplicate records, do you have a table with usernames as well which you dont want to have duplicate?Easy, mark the username field as unique again. It will never allow you to enter the same name, it will always return an error code.
And if two users modify a record at the same exact time, so what? What's the problem with that? The last one who saved will update the record. Is it different if the 2 saves were 1min apart or 1 sec apart?
In my humble opinion the whole record-table locking thing was used in the past because of hardware and software restrictions mostly. We dont need to do that anymore. Ive worked professionaly with dbase the last few years only, i was always working with sql databases in the past and to be honest i find it frustrating and difficult some times.
To me MySql especially makes things so much much easier for the programmer.
@Dragan
Thank you very much for your effort.I think you will help a lot of people.