NYCPHP Meetup

NYPHP.org

[nycphp-talk] DB Differences

Mark Armendariz nyphp at enobrev.com
Fri Jun 18 07:50:30 EDT 2004


 > Is this a 'webification' of something which has a good 'track 
> record' in terms of volume? Do you feel that the volume of 
> your system, in terms of users and/or transactions, is likely 
> to increase past the size of the 'tried and true' 

Ok, details required :)

It's a grading system written in access, being used by teachers via cf
express.  So current usage is about 5 - 10 people.  The web version will be
accessed by a couple hundred parents.  Obviously not any feat in traffic,
but the design is always important.

I'm actually in no position to change the 'parent' db (the access db), as
it's an application completely in use that I have no say in the maintenance
of.  I definitely would, and the improvements I have in mind are strictly
based on general experience in db efficiency and .. Well.. nice queries.

Here's an example table
Grade_id
Stud_id
S_first_name
S_last_name
Criteria_num (number of criterias used for this grade)
Crit_1_name
Crit_1_value
Crit_1_percentage
Crit_2_name
Crit_2_value
Crit_2_percentage
Crit_3_name
Crit_3_value
Crit_3_percentage
... (up to 12)

All the math I'll be doing with this setup will require me to grab all the
data and do some string manipulation for column names.  If I made a criteria
table with a grade_id (fk), I could do all the math in the query and knock
out 5 steps as well as keep everything far more efficient.  Also, having a
student name here and in a students table makes it easier to lose track of
one or the other.  Every change requires a change in 2 places.

> I would venture to say that the mismatch between your 
> understanding and your client's understanding of database 
> design will be more likely to cause 'headaches in the sync 
> functions' than the mismatch between the two database schemas.

Well, this is the primary dilemma.  Do I design the db 'my way' and make the
sync really nasty, while potentially offending the original developer -
while building a nice and easy to maintain site, or do I do it his way
trying to keep up with overlapping records and workarounds.

After typing all this out, I'm pretty sure I'll end up doing the db my way,
I was just wondering about the opinions of other pros out there.  If
anything I know the way I design my systems is tried and true enough for
these guys to seek me out in the first place.  Once the clock strikes 4am
such decisions can get a bit fuzzier.  So thank you all, if at least for
receiving this...

Thanks for the thought out reply, Tim, and I'll make sure to mention the db
analyzer to my client.  Good thinkin!

Mark




More information about the talk mailing list