Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Table and database relationship problem!!! HELP!!!

Status
Not open for further replies.

TNDaffy

Technical User
Mar 26, 2001
31
0
0
US
ok heres my fields I need, I'm not getting this to work for me, and I
don't know why, please tell me how I need to organize this into my
tables to function for me in my reports and form:

Field Names:
First Name Grade Tentmate
Last Name Age New Camper
Address Parent/Guardian Returning Camper - # of years
City M Work # Ethnic
State F Work # Camp Fee
Zip M Cell # Add Session Fee
County F Cell # Total Camp Fees
Home Phone Troop Level Deposit Fee
Early Bird Discount
Second Child Discount
Third Child Discount
Cookie Credit
Financial Aid
Balance Due
Payments Made
Paid In Full

Then the session information fields need to be able to reflect this information:
there is 4 sessions with 4 different programs to choose from within each one
a girl can choose more than one session, but only one program within a session
I need to be able to fill out one form for each child and pull reports that
reflect a listing of girl, program, session for the whole summer and each
session individually. So another words I need to enter most of the time more than one session and program choice, but the program must relate to the session she chose. Thanks in advance for assisting me with this problem, I had no problem getting our Day Camp set up, but this session program thing has thrown me, obviously, it's very frustrating! :)
 
I have to take a stab at this and see if I can get some cookie credit...

HappyCamperMomsMaidenNameTable
HCMMNid (P)
RelationID (F,1-n)
EthnicID (F,1-n)
ZipCodeID (F,1-n)
FirstName
LastName
Address
Phone
Cel
*Moms are a good base to start with, they can have many campers.

HappyCamperTable
HappyCamperID (P)
HCMMNid (F,1-n)
FirstName
LastName
Grade
Age
TroopLevel
TentMateID (self ref. to HappyCamperTable-HCID)
FirstYear
CamperStatusID (F,1-n)
*Happy Campers assumption: they live with mom, otherwise add address etc.

HappyCamperContactTable
HCCID (P)
HappyCamperID (F,1-n)
Name
RelationID (F,1-n)
Address
ZipCodeID (F,1-n)
Phone
Cel
*Other contacts for Happy Camper, Mom could always be automatically installed here.

HappyCamperAccount
HCMMNid (F,1-n)
HCSPID (F, 1-n)
FeeID (F,1-n)
DiscountID (F,1-n)
PaymentAmount
PaymentDate
*Happy Camper multiple accounting table. No stored calculated fields (Bal. Due...)

HappyCamperSessionProgramTable
HCSPid (P)
HappyCamperID (F,1-n)
SessionID (F,1-n)
ProgramID (F,1-n)
*1 camper,1 session,1 program key and a connecting key

CamperStatusTable
CamperStatusID (P)
CamperStatus
*Camper is new or returning or...

CityTable
CityID (P)
CityName
StateID (F,1-n)
*City table with State makes for easy sorting

ContryTable
CountryID (P)
Country
*As above

DiscountTable
DiscountID (P)
DiscountDescription <-Cookie credit!
DiscountRateOrValue
*An Inventory of delicious discounts

EthnicTable
EthnicID (P)
Ethnic
*Why type when you can pick from a list.

FeeTable
FeeID (P)
FeeDescription
FeeAmount
*Fees owed

ProgramTable
ProgramID (P)
Program
*The program choices

RelationTable
RelationID (P)
Relationship
*Assign the relation: is it Dad,Father,Pop,Daddy? Consistency!

SessionTable
SessionID (P)
Session
SessionStartDate
SessionEndDate
*The sessions definition

StateTable
StateID (P)
StateName
CountryID (F,1-n)
*Ditto on the sorting issue

ZipCodeTable
ZipCodeID (P)
ZipCode
StateID (F,1-n)
*and once more.

P-Primary key, F-Foreign, 1-n, One to many relationship.

It might look like a handful and I'm sure it's not perfect, but if you want to do it right you have to start with a good foundation. All the relationships can be established and once a bit of data is entered, it's all just pick and choose.
Write back with any comments or questions or if you need any help. I'm sure some others will have a go at this concept and from there you'll be on your way to creating a first class system that would be simply delicious! Gord
ghubbell@total.net
 
Thank you for your help, I haven't had time to test this out yet, but hopefully I'll be closer to getting it to work than I wise at least! If it solves all my problems, you will definately have earned some cookie credit in my book, LOL, and our camp registration person also!! Thanks again!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top