[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.9

Primary Key and rev control

Asked by efurhole in Databases Miscellaneous, Access Architecture/Design, Microsoft Access Database

Tags: Microsoft, Access, 2003, Primary Key

Hi,
I am new to Access.  I have four tables (customer, location, product, and order).  There is a one to many relationship between customer and location, location and product, product and order, respectively.  I have a primary key field in each of the four tables:  CustomerID, LocationID, ProductID, and OrderID (number, autonumber).

I have built a form that allows a user to create and enter an order.  The order form prompts the user to select a ProductID from a combobox.  The ProductID is saved into the order table.  Also, the LocationID and CustomerID are also saved into the order table.

The Location table contains ship to address information:  ShipToAdd, ShipToCity, ShiptoState, ShiptoZip, etc).  This information is NOT written into the Order Table when an order is entered.  I made this decision in an effort to keep the database streamlined  knowing that I could access this information with a simple query that pulled in the relevant information with the before mentioned LocationID.  I hope this is in keeping with good database construction design!

From time to time, I will need to edit information in any one of the four tables (for example, a Location record's zip code for instance).  Suppose I edit the zip code value (from 30058 to 30265) in a Location record (LocationID= 458).  Suppose that this location was one of many location records for a Customer record (CutomerID = 7777).   Suppose that I previously had entered 5 orders for CustomerID = 7777 to LocationID =458 BEFORE I changed the value of the zip code.  Suppose that I entered 5 orders for CustomerID = 7777 to LocationID =458 AFTER I changed the value of the zip code.

Now - if I were to run a report that showed sales sorted by zip code - the first five orders would have initially been associated with zip code 30058.  However, after the zip code change, the orders will be associated with zip code 30265 (even though they ACTUALLY occurred in zip code 30058).  Here's where my problem arises (and understand that I will use the "zip code" field as a representative example - there are many more specific and technically non-descript fields that are actually at play here).  I need to know the proper way to preserve the value of the zip code field (and the other 40 zip code like fields) for all orders.

You might suggest  just nail the 40 zip-code-like fields into the order table.  I might if thats what you recommend.  You might suggest - just make a new Location record for CustomerID = 7777 that reflects the new zip.  I could, however, that would require my users to go in and associate hundreds of customer specific ProductIDs to this new Location ID.  Instead, I'd like to know if it would be wise to add and use a rev level field to the design of the Location table.  

A rev level filed would require me to have duplicate LocationID numbers (one for each rev)....but I need to maintain each of the tables ID fields as primary keys.  Any thoughts on how I can maintain primary key status for CustomerID, LocationID, ProductID, and OrderID AND maintain some type of rev history control on the same records?  

Thanks
[+][-]04/19/08 07:46 AM, ID: 21392731Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: Databases Miscellaneous, Access Architecture/Design, Microsoft Access Database
Tags: Microsoft, Access, 2003, Primary Key
Sign Up Now!
Solution Provided By: yat993
Participating Experts: 3
Solution Grade: A
 
[+][-]04/18/08 08:58 PM, ID: 21391117Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/18/08 09:28 PM, ID: 21391174Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/18/08 09:43 PM, ID: 21391201Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/18/08 09:48 PM, ID: 21391205Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/19/08 05:30 AM, ID: 21392177Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/19/08 06:35 AM, ID: 21392383Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04/19/08 08:15 AM, ID: 21392806Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/19/08 09:14 AM, ID: 21393015Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/19/08 10:53 AM, ID: 21393332Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/19/08 06:28 PM, ID: 21394695Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92 / EE_QW_2_20070628