• No results found

Multi-user Databases with Microsoft Access

N/A
N/A
Protected

Academic year: 2021

Share "Multi-user Databases with Microsoft Access"

Copied!
34
0
0

Loading.... (view fulltext now)

Full text

(1)

Multi-user Databases with

Microsoft Access

A Presentation for the Microsoft Access SIG

of the North Texas PC User Group and the Metroplex Access Developers

by Larry Linson.

(2)

What is Access?

u “A nice little desktop database”

u First popular Windows database

u For the novice

u For the power user

u For the developer

(3)

Access can build

u

A standalone database

u A multi-user database

u A client linked to ODBC databases

u A direct client to SQL Server

(4)

Multiuser Database

u

Access Application Part

u

Access (Jet database engine)

Tables and Data

u

On a Network

(5)

Performance Factors

u Hardware Environment u Software Environment u Network Environment u Requirements of Application u Design of Application u Implementation of Application

(6)

How Many Users?

u

High-End Reports

Michael Groh – 150Drew Wutka – 135 Michael Kaplan – 90 +Stephen Forte – 95 u Concensus

(7)

How Many Users?

u “Routine” Reports

in comp.databases.ms-access newsgroupfrom experienced Access developers

30 - 70 users for Access 97 and Access 2000, a few less for Access 2.0

u Concensus

(8)

How Many Users?

u Low -End Reports

Falls over with 4 users

u Concensus

At least one factor “very wrong”Often many factors “wrong”

u Most common cause, when one proved

Designer / implementer did not understand Microsoft Access

(9)

Resources

. . .

u Access 97 Developer’s Handbook

u by Getz, Litwin, Gilbert

u published by SYBEX

u ISBN: 0 - 7821 - 1941 - 7

u Chap 12 – Developing Multi-User Applications

(10)

Resources

. . .

u Access 2000 Developer’s Handbook,

Volume 2: Enterprise Edition u by Getz, Litwin, Gilbert

u published by SYBEX

u ISBN: 0 - 7821 - 2372 - 4

u Chap 2 – Developing Multi-User Jet Applications

(11)

Resources . . .

u Programming Microsoft Access 2000

u by Rick Dobson

u publisher Microsoft Press

u ISBN: 0 - 7356 - 0500 - 9

u Chapter 10 – Working with

(12)

Resources . . .

u Building Applications with

Microsoft Access 97

u Manual, comes with Office

Developer or the MSDN Library

u publisher: Microsoft

uChapter 10 – Creating Multi-User

(13)

Resources

u Microsoft Office Visual Basic

Programmer’s Guide

u Manual, comes with Office 2000

Developer or the MSDN Library

u publisher: Microsoft

uChapter 16 –Multi-User Database

(14)

What’s Different?

u

Using database across network

File-Server versus Server DatabasesPerformance

Corruption

u

Multiple users of same data

Collisions (Add and Update) – Locking

Seeing Other Users Update – Refreshing

Updating Related Tables – Transactions

(15)

Multi-user Layout . . .

DATA ON SERVER PROCESS ON USER WORKSTATION PROCESS ON USER WORKSTATION

. . .

PROCESS ON USER WORKSTATION

(16)

Alternate Layout . . .

DATA PROCESS PROCESS PROCESS USER USER USER NT Server Remote MTS

(17)

Multi-User Layout

u Tables on Server

Available To All Users

u On Users’ Workstations

Access (or Runtime)Application Part

(18)

Access is a File-Server

u Retrieval, Extraction, and

Manipulation on User’s Workstation

u Every I/O Done Across Network

That would normally be to local hard drive

Not whole database, nor necessarily whole table

Just what Access finds necessary

(19)

Performance Factors

u Hardware Environment

u More Memory u Faster Processors u Faster Hard Drives

u Software Environment

u Not Too Much Else Running

u Network Environment

u Faster is Better

(20)

More Factors

u

Reduce Network Traffic

Database Design

u Appropriate indexing more important u Use Queries not Tables

u No extra Tables in Queries

Database Implementation

u Queries, not DAO Code (When Feasible)

u Queries, not RecordsetClone.FindFirst

(21)

Record Locking . . .

u In Bound Forms

No Locks (aka Optimistic Locking)

» Only in the instant the record is saved

Edited Record (aka Pessimistic Locking)

» As soon as user begins to edit

All Records

» All records in the entire recordset » Batch Updates

» Administrative Maintenance

(22)

Record Locking . . .

u Possibilities by Object

All Three Options

» Table datasheets; Select, Crosstab, Union Query, Forms, OpenRecordset

Lock Edited Record or All Records

» Update, Delete, Make-Table, Append

Lock All Records

» Data Definition Queries

No Locks or Lock All Records

» Reports

(23)

Record Locking . . .

u Default Record Locking Option

Established by menu Tools | Options

u Applies to All, Except

Data Definition Queries – All RecordsOpen Recordset – Edited Record

(24)

Record Locking . . .

u OpenRecordset

dbDenyRead or dbDenyWriteOverrides .LockEdits propertyNative Access Tables Only

u .LockEdits Property

True = Edited Record (the default)False = No Locks

(25)

Record Locking . . .

u Advantages of Pessimistic Locking

Simple to Develop, Prevents Overwriting

u Disadvantages of Pessimistic

Lock Multiple Records, Less Concurrency

u Advantages of Optimistic Locking

Simple to Use, Better Concurrency, Less Lockout

u Disadvantages of Optimistic

Can be Confusing to User, Allows Overwriting

(26)

Record Locking

u Generally, use Optimistic

Minimize User Lockout

u Or, Mixed, by Specific Object

Most Optimistic, but

Critical Information, Pessimistic

» Example: Quantity on Hand in Inventory

(27)

Locking Improvements

u Access 2.0

Page Locking, Adding Locked Last or New Record

u Access 95, 97

Page Locking, but Adding Doesn’t Lock Last or New Record

u Access 2000

Record-Level Locking, Optional

(28)

Transactions

u

Changes in a batch

u

All Succeed or All Fail

u

Same or Related Tables

Credit New Account and Debit Old Account

Allocate Stock to Order, Deduct Stock on Hand

(29)

Causes of Corruption

u Ungraceful TerminationPower OutagesUsers Power-OffFlakey Network u CountermeasuresBattery Back-Up

Condition of Continued EmploymentIsolate Cause and Replace

» Hardware

» Staff

(30)

Identifying Users

u

Typically secure the database

Everyone Logs In

u

Viewing and Reporting

MSLDBUSR.DLL by MicrosoftUnsupported

(31)

Advanced Multi-User

u

Stretch the Capacity

u

“Unusual” Requirements

u

Standard Approach Insufficient

(32)

Advanced Multi-User

u

Unbound Forms

u

Code / Queries

u

Hold record minimal time

(33)

Advanced Multi-User

u

Buys a little time (at best)

u

Consider “upsizing”

u

Often non-trivial project

to extend multiuser application

(34)

The End

Multi-user Databases with Microsoft Access

.

References

Related documents

Although BioNumerics can automatically create a relational database that acts as personal data storage (i.e. for a single user), databases that require simultaneous multi-user

The access items are assigned to one or more user access group(s) in the User properties dialog box, see Section 6.3.1 User access groups, on page 1623. To view the

Help Desk – User HD-USR Normal business hours end-user support for Microsoft Outlook, Outlook Web Access and mobile devices, including end-user Active Directory and Microsoft

In this session we will cover the following topics: Creating a form using the wizard or from blank Simple design changes on forms in Layout View Adding and arranging controls on

Microsoft Access comes from its ability to quickly find and bring together information stored in separate tables using queries, forms, and reports. In order to do this, each

After you complete the wizard, Microsoft Access sets the data type based on the values selected in the wizarda. The same size as the primary key field used to perform the

The North Texas Microsoft Developers SIGs (Beginning Visual Basic, Advanced Visual Basic, Access, and Application Developers Issues SIGs) will meet the second Saturday of each month

The Application User account now needs to be associated to a Select User Management > User Settings > Access Control Group.. Using the icon, add a new Access Control