Followup question from Newbie - Database

K

Kelly

I posted a question last month and I need more help on it. I am setting up a
database that will allow me to post receipts from donors to multiple
accounts. As you can see, one donor may want their funds to be applied to
fund A and B. So the below suggestion was made to me, which I have copied
and am just now starting to work on. (It's been a busy month.) The very
last table below "TableDonationsDetails" does not have a primary key
designated. Is that a mistake, should there be one, and if so, what? I have
related tables before, but I'm very new at it and there weren't as many, I'm
sure I'll be needing more help once I get there.



Id have the following (at least)

TableDonors
DonorIdentificationNumber (Primary Key)
DonorFirstName
DonorLastNAme
DonorAddress1
DonorAddress2
DonorCity
DonorState
DonorZIP
DonorHomePhone
DonorWorkPhone
etc.


TableFunds
FundNumber (Primary Key)
Fund Name
etc.



TableDonationMain
DonationNumber (Primary Key)
Date
Method (cash, check, etc.)
DonorID (foreign key to TableDonors)
TotalAmount
etc.


TableDonationDetails
DonationNo (Foreign Key to TableDonationMain)
Amount
FundNumber (Foreign Key to TableFunds)




Then, a person or organization would have one entry in TableDonors. But
might have many entries in the TableDonationMain if they have given several
times.

One check would have one entry in the TableDonationMain. If this check is
split between three funds, you'd have three entries in TableDonationDetails.
 
V

Van T. Dinh

In theory, each Table should have a PrimaryKey. In the case of
TableDonationDetails, you can use the combination of DonationNo and
FundNumber as the multiple-Field PrimaryKey for the Table.

Each Table can have only ONE PrimaryKey but the PrimaryKey can combine up to
10 (?) Fields from the Table.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top