[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

table advice

Posted on 2011-02-26
4
Medium Priority
?
261 Views
Last Modified: 2012-05-11
I have a table tblAffiliates where people can register as affiliates. Only some of the applicants are actually accepted. With those people I need to give them an Affiliate Code.

I am thinking of setting up a second table tblAffiliateCode so the codes can be unique (and without nulls).
eg
ID    Code
1    A01
2    A02
3    A03, etc.

How would I relate the 2 tables? would I add an AffiliateID in the tblAffiliateCode table? or would it be better to add a filed in the tblAffiliates table and store the ID or Code from the tblAffiliateCode  table?
0
Comment
Question by:Shawn
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 32

Expert Comment

by:Ephraim Wangoya
ID: 34989358

You can add the field AffiliateCode in table tblAffiliates and store the ID of the of the code in there


0
 
LVL 32

Accepted Solution

by:
Ephraim Wangoya earned 1000 total points
ID: 34989361

Sorry meant to type AffiliateID

Add the field AffiliateID in table tblAffiliates and store the ID of the of the code in there
0
 
LVL 4

Assisted Solution

by:tabish
tabish earned 1000 total points
ID: 34989444
Add an ID like AffiliateCodeID (in your example you are calling it ID. I would prefer more self explaintory name) in tblAffiliates and store the AffiliateCodeIDs there .  

The structure of the table "tblAffiliateCode" to store code is ok. You just may want to change the name of the field from ID to AffiliateCodeID.
0
 
LVL 1

Author Closing Comment

by:Shawn
ID: 34989524
thanks for clarifying.

Shawn
0

Featured Post

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

649 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