Solved

access primary key

Posted on 2013-01-31
11
174 Views
Last Modified: 2013-02-20
I need some advice I need to create a database Global for my company which have a lot suppliers coming from all over the world. I need to create this database base on each location( sample USA, CANADA, UK, ASIA, AUSTRALIA)... I already have tables from all over the places with manufactures, distributor an extra info..My question is how can I set a primary key for each location supliers so all tables are not auto (01,02,03) and how can I build a relationship and run querys .
How can combine all and not show no repeats because some of the suppliers are repeats in some tables like for example USA and Canada may have some similar supplier.

Thanks for any advice hot to start this Monster!!
0
Comment
Question by:gabgar
  • 3
  • 3
  • 2
  • +3
11 Comments
 
LVL 57
ID: 38841300
You really want an autonumber for the primary key.

 You will also need to create a second unique index on enough data to ensure that you don't enter someone twice.

 Where they are is just another fact (field or "attribute") about the company as is what they are.


  Extra information can be handled in a number of ways. We'd need to walk through that to determine how best to handle.

Jim.
0
 
LVL 57
ID: 38841309
Also, since this sounds like your first DB and your aksing about keys, it's would be worth while to spend an hour on this:

.HOW TO: Introduction to Application & Database Design using Microsoft Access
http://www.youtube.com/watch?v=4YH6gG0Y660

Jim.
0
 
LVL 30

Expert Comment

by:hnasr
ID: 38841379
Autonumber type is used for data that is not localized (i.e not known to the company). For example adding customers you need autonumber as primary key.

For company employees you can use predefined ids.
When using CustomerID in other tables as foreign key, it is a number and can be linked to the Customers table whose PK is autonumber.

You may start with a template from  available templates or Office.com.
Use Northwind database tohelp in designing your required database.
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 

Author Comment

by:gabgar
ID: 38841389
Jim,

Is there local help from expert exchange?, or can the communication can be via phone?
0
 

Author Comment

by:gabgar
ID: 38841485
Northwind where can I find that?
0
 

Author Comment

by:gabgar
ID: 38841499
No that one wont work.
0
 
LVL 57

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 500 total points
ID: 38841520
<<Is there local help from expert exchange?, or can the communication can be via phone? >>

 This is it.  Experts-Exchange is a forum based help service and EE itself only provides the means of people to help people.  It doesn't hire Expert's or provide help on it's own.

Jim.
0
 
LVL 30

Expert Comment

by:hnasr
ID: 38841685
From the topics listed, I assumed using Access database.
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 38841957
"Is there local help from expert exchange?, or can the communication can be via phone?"  
If you are really over your head and want somebody to help you personally, you can look up experts profile and if they have a listed address, you may contact  them probably on a for hire basis.  But first try here as there is really no question too difficult especially with databases and access.  

Instead of trying to do everything at once, take it in bits by asking separate questions.  The first thing to do is set up your tables.  And before doing that, make sure the data is normalized.  http://en.wikipedia.org/wiki/Database_normalization  

This should really be your first question, getting help on your data tables and possibly reformatting or breaking out your database.
0
 
LVL 48

Expert Comment

by:PortletPaul
ID: 38842573
I don't think there is enough information available to advice on your design issues.

e.g. take a well known global supplier like:
IBM

which has smaller entities - such as:
IBM USA
IBM Australia
IBM Europe

Is this one supplier (IBM) or 3? (3 legal entities, different currencies, different taxes etc.)

Will you need a hierarchy of suppliers? e.g. you have both IBM and the many legal entities that belong to IBM.
0
 
LVL 49

Expert Comment

by:Gustav Brock
ID: 38843194
You can either use a GUID as autonumber key (select Autonumber/Replication ID when creating the field); or you can use a compound unique key made from one fixed key unique for each location and one traditional (Long) autonumber.

/gustav
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Confronted with some SQL you don't know can be a daunting task. It can be even more daunting if that SQL carries some of the old secret codes used in the Ye Olde query syntax, such as: (+)     as used in Oracle;     *=     =*    as used in Sybase …
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question