“But aren’t you supposed to minimize redundancy in a database…”

      Comments Off on “But aren’t you supposed to minimize redundancy in a database…”

I’m building an SQL database to help with assessment of library services.   Today’s autodidactic activity involved counting the number of students by status (undergrad, grad or law) based on the declared home address in the registrar’s database.

Finally nailed the SQL syntax but as I looked more closely at the results, excitement waned…

2013-09-20_13-37-08

I suppose there are other ways to mangle Washington, DC during data entry.  Maybe if I were to just count DC in the “state” field–surely that would be a reasonable proxy for living in the District, right?

2013-09-20_14-11-19

Ordinarily, yes, but that student from Bangalore, India, DC still leaves us with an off-by-one error.