php - Trouble designing ERD for monthly reports containing several zip codes -


this erd food bank system. i'm unsure how handle zip codes @ moment. i'm not sure on necro policy here, here's old question in case: need designing erd food bank

ok food bank gives food out agencies. each month agency fills out report one: http://communityfoodbank.net/agencyaccess/submitareport.aspx need know how many people fed each zip code. now, part counted outside of system. serve food 4+ times month, tally it, , submit report. want save stats in system.

how should go this? suggested in original question make zipcode part of pk on monthlyreport table. agencies , zip codes serve imagine rough on database. still recommended new information in mind?

how store monthly report , log number served each zip code, keeping in mind more zip codes added agents grow.

enter image description here

update

with current setup, monthlyreport table generate on 9000 rows month. 30 rows per month per agency. if write reports excel file create 600 files monthly. can't figure out best way this.

this looks good. don't worry being "rough on database"

with design, need hundreds of thousands of rows before see noticeable performance hit (like > 1 second).

you want zip codes on reporting table. in normal design attached agency, reporting, need historical accuracy. prevents problems when agency adds or drops zip code.

you have current zip codes tied agency, , copy them monthly report via trigger or manually.

i don't see other issues here.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -