Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


May 2006

Access Database Efficiency


RSS
Subscribe to Windows IT Pro | See More Database Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!
Main Article    42 Tips to Empower Your Office Users

Microsoft Access is an efficient IT solution for creating simple databases to address some of your company's needs, especially if you have a limited budget. The tips I offer in this article will help you create more efficient databases and maximize processing time.

TIP 1: Always close Access when it's not in use.
Keeping your Access database open and minimized when you're not using it is convenient, but doing so can lead to database corruption, particularly if you have a shared database on your network. Closing database files when you aren't using them and exiting Access not only frees up resources and connections to the database, it also avoids database damage that can occur if your computer is unexpectedly shut down.

TIP 2: Determine who is using a database.
If you need to back up a database, or if you need exclusive access to it, you can determine whether any users are using the database files. Access tracks user-connection information for the database in an .ldb file, which resides in the same folder as the Access application. The .ldb file lists the logon and workstation names of all the users who are currently connected to an Access database file. If the .ldb file doesn't exist, no one is connected to the database and you should be able to access the database exclusively or perform a backup. If an .ldb file exists, you can open it by using Microsoft Notepad or WordPad. If you can't open the file with these accessories, copy and save the file with a new filename, then try to open it.

TIP 3: Routinely back up your databases.
If you're working in a network environment, make sure your database is backed up properly during scheduled network backups. Before you run a backup, verify that all database files are closed; otherwise, the backup job might skip the open database file. Before you begin to modify a database file, consider copying the file to a backup folder. You can also do a quick backup by selecting Tools from the Access toolbar, then choosing Database Utilities and Back Up Database.

TIP 4: Compact your databases to prevent database corruption.
Compacting your database is one of the best ways to prevent database corruption and improve runtime performance. Similar to disk defragmentating, database compacting rearranges and optimizes used and unused disk space in a database by removing your old Access files and replacing them with compacted versions. If your Access database is on NTFS, it's best to set up folder permissions and use Access database user-level security because the compacting process will reset any file-level permissions to their default settings. To compact your database, start by backing up the database. Select Tools from the Access toolbar, then Database Utilities, and choose Compact and Repair Database. If you're using a Visual Basic for Applications (VBA) script, use the following command to compact a database:

Application.CompactRepair(SourceFile,
  DestinationFile, LogFile) 

TIP 5: Split databases into a front end and a back end.
When designing a multiuser Access database, consider splitting information into two pieces—a front end and a back end—to maximize the 2GB database size limit and achieve better performance. For example, your front-end database might contain your forms, reports, queries, and modules, and your back-end database might contain the data tables. Splitting the database also makes entering new data or modifying existing data easier. For example, after the split, if you want to enter changes on forms and reports, you need to update only the front-end database, leaving the back-end database untouched. To split a database, select Tools from the Access toolbar, then Database Utilities, and choose Database Splitter.

If you're working on a WAN, it's more efficient to load a front-end database rather than to load a database that contains everything (i.e., forms, records, and tables). To prevent database corruption in a multi-user environment, I recommend compiling your front-end database as an MDE database (i.e., an Access database) by selecting Tools from the Access toolbar, then Database Utilities, and choosing Make MDE File. Then, distribute the MDE file onto users' local machines.

TIP 6: Create a primary key to prevent duplicate records.
One fundamental database design rule is to keep your database free of duplicate records. An easy way to avoid duplicate records is to define a primary key or set of primary keys that uniquely identifies each record in a table. The primary key also functions as a unique index or ID. Some examples of primary keys are item number (or AutoNumber), Social Security Number, and location. Access offers three types of primary key data types: AutoNumber, single-field, and multiplefield. The most common primary keys are Auto-Number and single-field.

TIP 7: Use index entries for faster processing rates.
Using index entries lets the database more quickly sort and retrieve records in a table. The field used as an index is often determined by which field (or fields) the WHERE clause uses most often in queries. You can indicate whether the index field should be unique or allow duplicates by selecting Yes (unique) or No (allow duplicates) in the index's Unique property field. If a database table's primary key is set up as an AutoNumber data type, you should set the Unique index property to Yes to prevent a user from entering the same record twice. You can also set an index entry as single-field or multiple-field. Remember that an index creates overhead in both disk space and processing time, so avoid creating unnecessary index entries.

   Previous  [1]  2  Next 


Reader Comments

You must log on before posting a comment.

If you don't have a username & password, please register now.




Top Viewed ArticlesView all articles
Friday at PASS Europe 2006

Kevin talks about the closing day of the event and shares a funny Microsoft film. ...

PsExec

This freeware utility lets you execute processes on a remote system and redirect output to the local system. ...

More fun TechEd 2005 Resources

Kevin points out some more TechEd resources ...


Development Whitepapers Batch Job Scheduling and .NET in 2008

Database Professionals: Experience Profile and Need Gaps in Development and Database Tools

Related Events Check out our list of Free Email Newsletters!

Related Development Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.

Job Openings in IT


ADS BY GOOGLE SPONSORED LINKS FEATURED LINKS

Microsoft Exchange & Windows Connections event returns to Las Vegas Nov 10 - 13
Connections returns to Las Vegas for this exciting event where each attendee will receive SQL Server 2008 standard with 1 CAL. Co-located with Microsoft ASP.NET, SQL Server, and SharePoint Connections with over 250 in-depth sessions.

Free Online Event! Virtualization:Get the Facts!
Register now and attend this free, live in-depth online conference on November 13 and 20, 2008, produced by Windows IT Pro. All registrants are eligible to receive a complimentary one-year digital subscription to Windows IT Pro (a $49.95 value)!

Check Out Hyper-V Video on ITTV
Watch Karen Forster's interview on Hyper-V's performance on ITTV.net.

Ease Your Scripting Pains with the Flexibility of PowerShell!
Join MVP Paul Robichaux on December 11, 2008 at 11:00 AM EDT as he equips you with PowerShell basics in 3 introductory lessons, each followed by a live Q&A session—all on your own computer!

PASS Community Summit 2008 in Seattle on Nov 18-21
The don’t-miss event for Microsoft SQL Server Professionals. Register now and you’ll enjoy top-notch Microsoft and Community speakers and more.



Speed Up Your PC!
Try Diskeeper 2008 with InvisiTasking Free Now!

Get Protected -- Data Protection Manager 2007
Protect your virtualized environment with Data Protection Manager

Agent-less Remote Backup Service, Free 30 Day Trial
Award winning remote backup service at a competitive price with no min GB/month. Sign up Now!

ScriptLogic Cartoon Caption Contest
Submit your caption and you will be entered to win $198.42

Order Your SQL Fundamentals CD Today!
Learn how to use SQL Server, understand Office integration techniques and dive into the essentials of SQL Express and Visual Basic with this free SQL Fundamentals CD.

List Your Products in Our Technology Resource Directory
Don't miss the chance to post your free listing in this comprehensive directory for IT and developer professionals, powered by Windows IT Pro. But hurry! Deadline ends Oct. 9.
Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing