1 / 7

Database Access: Multi-User Databases

Database Access: Multi-User Databases. Multi-User Issues Locking Schemes Database Locking Recordset Locking Record Locking. Multi-User Issues. Database access Database security Data currency Locking

dara
Download Presentation

Database Access: Multi-User Databases

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Database Access: Multi-User Databases • Multi-User Issues • Locking Schemes • Database Locking • Recordset Locking • Record Locking University of South Alabama School of CIS

  2. Multi-User Issues • Database access • Database security • Data currency • Locking • a process whereby the current user of information in a database controls or limits access to some or all of that information by other users while the current user has access. • locking is used to prevent simultaneous update attempts • Application performance University of South Alabama School of CIS

  3. Locking Schemes • Database Locking • Recordset Locking • Record Locking University of South Alabama School of CIS

  4. Database Locking • Lock an entire database when opening • Simplest, yet most restrictive method • Example: Dim ConnDB As new ADODB.Connection ConnDB.Open “Provider=Microsoft.Jet.OLEDB.3.51;” & _ “Persist Security Info=False;” & _ “Data Source=C:\Company.mdb;” & _ “Mode=Read|Write|Share Deny Read|Share Deny Write” University of South Alabama School of CIS

  5. Recordset Locking • Deny read access • prevents users from reading the records • Deny write access • prevents users from writing to recordset • Locking remains in effect as long as the recordset is opened by your (the locking) program • ADO supports deny write access recSet.Open “Employees”, connDB, _ adOpenKeyset, adLockReadOnly University of South Alabama School of CIS

  6. Record Locking • Done automatically by VB • Record locking is an alternative to database or recordset locking • Other users can read, but not change locked record University of South Alabama School of CIS

  7. Optimistic and Pessimistic Record Locking • Pessimistic Locking • locks current record when editing buffer • releases record when .Update is finished writing record • Optimistic Locking • locks record when .Update method is invoked • releases record when .Update is finished • Must set the LockType property recSet.Open “Employees”, connDB, _ adOpenKeyset, adLockOptimistic ‘* optimistic locking recSet.Open “Employees”, connDB, _ adOpenKeyset, adLockPessimistic ‘* pessimistic locking University of South Alabama School of CIS

More Related