CSC 3800 Database Management Systems Time: 1:30 to 2:20Meeting Days: MWFLocation: Oxendine 1237B...

Preview:

Citation preview

CSC 3800 Database Management Systems

Time: 1:30 to 2:20 Meeting Days: MWF Location: Oxendine 1237B

Textbook: Databases Illuminated, Author: Catherine M. Ricardo, 2004, Jones & Bartlett Publishers

Fall 2009

Project ExampleBeta University

Dr. Chuck Lillie

General DescriptionGeneral DescriptionDonations from variety of donors.Collects over $10 million per yearDonors include:

Graduating seniorsAlumniParentsFacultyAdministratorsStaffCorporationsFriends

100,000 potential donorsSuzanne Hayes is director

Raising fundsKeeping track of funds

Create database to help with the two tasks

Basic OperationsBasic OperationsFundraising each year from July 1 to

June 30Each fall, all potential donors receive

personalized letters.◦ Contain reply envelopes and forms

Amount donated Payment methods

Single check Deferred payments over year Credit card number to pay in lump sum

Contact information of rmatching funds donor

Thank you letter is sent to each donorFollow-up to corporate matching funds

donor

Basic Operations (cont)Basic Operations (cont)Fundraising events

◦ Fall carnival◦ Holiday dinner dance◦ Spring golf outing◦ Other events

Each class year has coordinatorLetters sent to reunion class members

asking for donationsSpring phonebankCoordinator call each who has not

donated by May◦ Suzanne makes calls coordinator cannot

Basic Operations (cont)Basic Operations (cont)Donations categorized by

◦ Groups

◦Year of donor◦Size

10 donor circles President over $50,.000 Platinum over $25,000 Etc. Under $100 not listed in a circle

Annual donors list published and mailed to all donors and potential donors◦ Category◦ Year◦ Donor circle◦ Does not list amount of each donor

Information NeedsInformation NeedsMailing list on word processor

◦Would like to add line about each donor’s amount given the previous year

Spreadsheet keeps track of pledges and donations◦No way to track monthly pledges◦Use database to send late reminders

to monthly pledges over one month late

Information Needs (cont)Information Needs (cont)Information on letter form

◦Name, address, category (senior, alumnus/alumna, parent, administrator, etc.), year of graduation, date of pledge/gift, amount of pledgted, amount enclosed, payment method, number of payments chosen, credit card number, matching corporation name, matching corporation address, name of spouse (if matching gift is from spouse’s employee).

Have similar information captured in phone calls

Information Needs (cont)Information Needs (cont)Reports

◦Annual report to donors◦Monthly report◦Payments due report◦Event report◦Class representative contact list◦Phonothon volunteer contact list

List of AssumptionsList of AssumptionsInitial List of Assumptions

◦ 1. Names of donors are not unique, but names of volunteers and matching corporations are unique.

◦ 2. A person may belong to more than one category. For example, a parent may also be an alum.

◦ 3. A person may have more than one degree from the university, so he or she may have more than one graduation year. That person’s gift is counted in the totals and percentages for all his or her graduation years.

◦ 4. There is exactly one class representative for each graduation year.

◦ 5. A potential donor receives a call from at most one class representative or volunteer each fund year.

◦ 6. A donor may give more than one pledge during a fund year.

List of AssumptionsList of Assumptions◦ 7. A person may attend several fundraising events

within a year. ◦ 8. It is desirable to know which pledges are due to a

fundraiser, but not necessary to know which are due to a class coordinator or volunteer’s call.

◦ 9. All pledges for a given fund year are collected within that year.

◦ 10. Matching gifts are paid by corporations in a single payment within the same fund year as the donor’s gift.

◦ 11. At the end of each fund year, the entire database is archived, and a new database for the new fund year is created. The database name identifies the year.

◦ 12. All addresses consist of street, city, state, zipcode or postal code, and country.

◦ 13. All telephone numbers consist of country code, area code, and number.

Data Dictionary DesignData Dictionary Design

List data dictionary items with definitions

See Data Dictionary List

Additional AssumptionsAdditional AssumptionsAdditional Assumptions (added for ER

diagram)◦ 14. Payment is a weak entity, dependent on Pledge.◦ 15. All payments are due the first of each month, so

the dateDue for a next payment on an unfinished pledge is always the first of the next month.

◦ 16. The Payment Due report program calculates the desired data from the stored data.

◦ 17. At most two corporations match a donation, the donor employer and the spouse’s employer.

◦ 18. There are never two payments received for the same pledge on the same day.

◦ 19. Since a potential donor may have more than one graduationYear, the donor may be related to more than one class rep.

Cross Reference ChartCross Reference ChartSee Beta U Cross Chart

E-R DiagramE-R Diagram

See Beta U AttributesSee Beta U E-R Diagram

Non-Normalized RelationsNon-Normalized RelationsPotential Donor(donorId, firstName,

lastName, street, city, state, zip, country, countryCode, areaCode, telNumber, donorCircle, spouseName, amountDonatedLastYear, amountPledgedThisYear, amountPaidThisYear,volunteerName)

Functional Dependencies◦ donorId → all attributes◦ country → countryCode◦ {country,zip} → city, state◦ amountPledgedThisYear → donorCircle

Non-Normalized RelationsNon-Normalized Relations

Donor-Categories(donorId, category)

Functional Dependencies◦has no non-trivial FDs

MatchingCorp(matchCorpName, street, city, state, zip, country, countryCode, areaCode, telNumber)

 Functional Dependencies◦{country,zip} → city, state◦country → countryCode

Non-Normalized RelationsNon-Normalized RelationsEvent(eventName, eventDate,

eventTime, eventLocation, eventOrganizer, eventTotalPledged eventTotalPaid)

 Functional Dependencies◦ eventName → all attributes

ClassRep(graduationYear, firstName, lastName, street, city, state, zip, country, countryCode, areaCode, telNumber)

 Functional Dependencies◦ graduationYear → all attributes◦ {country,zip} → city, state◦ country → countryCode

Non-Normalized RelationsNon-Normalized RelationsVolunteer(firstName, lastName, street, city,

state, zip, country, countryCode, areaCode, telNumber)

 Functional Dependencies◦ {firstName, lastName} → all attributes◦ {country,zip} → city, state◦ country → countryCode

Pledge(pledgeNumber, pledgeAmount, pledgeDate, numPaymentsChosen, pledgeAmountPaid, numPaymentsMade, donorId, eventName)

 Functional Dependencies◦ pledgeNumber → all attributes

Non-Normalized RelationsNon-Normalized RelationsPayment(pledgeNumber, datePaid, amount

Paid, paymentMethod, creditCardType, credit Card Number, matchingCorpName)

 Functional Dependeny◦ {pledgeNumber, datePaid} → all attributes

PotentialDonor-Event(donorId, eventName )

Functional Dependeny◦ has no non-trivial FDs

Pledge-MatchingCorp(donorId, matchCorpName, empName)

Functional Dependeny◦ {donorId, matchCorpName} → all attributes◦ {donorId, empName} → all attributes

Non-Normalized RelationsNon-Normalized Relations

Donor-Years(donorId, graduationYear)

Functional Dependency◦no non-trivial FDs

Donor-Categories(donorId, category)

Functional Dependency◦no non-trivial FDs

Normalized RelationsNormalized Relations Potential Donor(donorId, firstName, lastName, street, city, state, zip,

country, countryCode, areaCode, telNumber, donorCircle, spouseName, amountDonatedLastYear, amountPledgedThisYear, amountPaidThisYear,volunteerName)

Functional Dependencies◦ donorId → all attributes

◦ country → countryCode

◦ {country,zip} → city, state

◦ amountPledgedThisYear → donorCircle

Normalized Relations◦ PotentialDonor(donorId, firstName, lastName,

street, zip, country, areaCode, telNumber, spouseName, amountDonatedLastYear, amountPledgedThisYear, amountPaidThisYear, volunteerName)

◦ CountryCodes(country, countryCode)◦ ZipCodes(country, zip, city, state)

Non-Normalized RelationsNon-Normalized Relations Donor-Categories(donorId, category) Functional Dependencies

◦ has no non-trivial FDs

MatchingCorp(matchCorpName, street, city, state, zip, country, countryCode, areaCode, telNumber)

 Functional Dependencies◦ {country,zip} → city, state

◦ country → countryCode

Pledge-MatchingCorp(donorId, matchCorpName, empName)

Functional Dependeny◦ {donorId, matchCorpName} → all attributes

◦ {donorId, empName} → all attributes

Normalized Relations◦ DonorCircles(circleName, floor, ceiling)◦ Donor-Categories(donorId, category) ◦ MatchingCorp(matchCorpName, street, zip, country,

areaCode, telNumber)

Non-Normalized RelationsNon-Normalized RelationsEvent(eventName, eventDate,

eventTime, eventLocation, eventOrganizer, eventTotalPledged eventTotalPaid)

 Functional Dependencies◦ eventName → all attributes

Normalized Relations◦ Event(eventName, eventDate, eventTime,

eventLocation, eventOrganizer, eventTotalPledged eventTotalPaid)

Non-Normalized RelationsNon-Normalized RelationsClassRep(graduationYear, firstName,

lastName, street, city, state, zip, country, countryCode, areaCode, telNumber)

 Functional Dependencies◦ graduationYear → all attributes◦ {country,zip} → city, state◦ country → countryCode

Normalized Relation◦ ClassRep(graduationYear, firstName,

lastName, street, zip, country, areaCode, telNumber)

Non-Normalized RelationsNon-Normalized RelationsVolunteer(firstName, lastName, street, city,

state, zip, country, countryCode, areaCode, telNumber)

 Functional Dependencies◦ {firstName, lastName} → all attributes◦ {country,zip} → city, state◦ country → countryCode

Normalized Relation◦Volunteer(firstName, lastName,

street, zip, country, areaCode, telNumber)

Non-Normalized RelationsNon-Normalized RelationsPledge(pledgeNumber,

pledgeAmount, pledgeDate, numPaymentsChosen, pledgeAmountPaid, numPaymentsMade, donorId, eventName)

 Functional Dependencies◦ pledgeNumber → all attributes

Normalized Relation◦ Pledge(pledgeNumber, pledgeAmount,

pledgeDate, numPaymentsChosen, pledgeAmountPaid, numPaymentsMade, donorId, donorMatchingCorp, spouseMatchingCorp, eventName)

Non-Normalized RelationsNon-Normalized RelationsPayment(pledgeNumber, datePaid, amount

Paid, paymentMethod, creditCardType, credit Card Number, matchingCorpName)

 Functional Dependeny◦ {pledgeNumber, datePaid} → all attributes

Normalized Relation◦ Payment(pledgeNumber, datePaid, amount Paid,

paymentMethod, creditCardType, credit Card Number, matchingCorpName)

Non-Normalized RelationsNon-Normalized RelationsPotentialDonor-Event(donorId,

eventName )Functional Dependeny

◦ has no non-trivial FDsNormalized Relation

◦ PotentialDonor-Event(donorId, eventName )◦ Donor-Years(donorId, graduationYear)