Think Before you Choose a Primary Key in Ms Access

The Ms AccessPrimaryKey application has a wide user base and it includes both professional programmers and average computer users. In fact the number of people, ranging from office executives to small business owners, using the Ms Access database base with very little technical knowledge is considerably high. While using the Ms Access application is extremely easy, the lack of technical knowledge can cause hassle at times. Take the case of selecting a primary key while creating a table to store records. Some users can opt to make the first names of records as primary key or choose to use Zip codes as the primary key. However both zip codes and first names can be common and this could lead to an error. If duplicates exist in your database tables then there is a grave danger that Ms Access can drop the linked indexes during a compact process.

 

Tips for Selecting a Primary Key

Ideally you should only select a field for primary key when the entries made into it are unique. For example if you are creating a database for office employee records, the employee ID can be considered as a primary key. However you need to keep in mind whether an employee ID has been reissued to any other employee after the first employee left the office.

The best way to create a primary key involves the use of auto number generated by Ms Access. The application offers us with AutoNumber data type that can effectively generate unique record IDs that can be specified for every individual record. Moreover this weeds out any chances of duplicates being created.

 

Filtering Duplicate Primary Keys

In the event that you have already specified a Primary key in Ms Access where duplicates can be generated, you need to manually filter such IDs and change them. This can be achieved with the help of the Find Duplicates Query Wizard which can identify such records.

 

Dealing with Crashes in Ms Access

While Microsoft has invested a great deal of energy in making Ms Access powerful and yet simple, it seems to have failed to address its stability. The application has a propensity to crash, especially during the application development phase or when run over a network. Now if your business has an application that uses Ms Access at the backend, it makes great sense to get hold of an access repair tool like DataNumen Access Repair to deal with emergencies. This potent tool can negotiate the most complex MDB file corruption issues without breaking a sweat and can get back all data with their dependencies in place. The application is uniquely suitable for dealing with MDB file corruption issues arising out configuration issues or mismatch of service packs running on different terminals. Further it can successfully recover a whole bunch of corrupt MDB files in the batch mode and complete the process in a relatively short time period.

 

Author Introduction:

Alan Chen is President & Chairman of DataNumen, Inc., which is the world leader in data recovery technologies, including access repair and sql recovery software products. For more information visit www.datanumen.com

 

Comments are closed.