Solved

table setup question

Posted on 2011-02-15
3
886 Views
Last Modified: 2012-05-11
I am setting up an affiliate program and need a little help setting up the tables.

Each new Affiliate can be Sponsored by one person and once an Affiliate is set up he can Sponsonr as many people he likes.

the first table is tblAffiliates with AffiliateID, Name, email and possibly SponsorID (just another AffiliateID)

the next table to set up would be tblAffiliateSponsors with AffiliateSponsorID, AffiliateID, SponsorID (this would actually be another AffiliateID. just 2 different people)

something just seems strange.

any advice on how to set this up?
0
Comment
Question by:Shawn
  • 2
3 Comments
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
Comment Utility
Can a single person be sponsored by ONLY one person?

If so, then including the SponsorID field in your Affiliates table (and linking that back to the AffiliateID) should work. This is a "self-join".
0
 
LVL 1

Author Comment

by:Shawn
Comment Utility
yes, only one person.

ah right. So when I if I want to know all the people Bob has sponsors I do a query on the same table with Bob's ID as the filter
0
 
LVL 84
Comment Utility
Yes.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

763 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now