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
Solved

table setup question

Posted on 2011-02-15
3
890 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
ID: 34902854
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
ID: 34902861
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
ID: 34903041
Yes.
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

I have a large data set and a SSIS package. How can I load this file in multi threading?
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE sā€¦

829 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