Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

A database with dead kids that have to be tested for in every damn query is a pretty nasty database.

Maybe there should be a separate database of historic students who used to go to that school, and currently enrolled.

It's not just "isDeceased", but "goesToThisSchool". Nobody want to get some notification from a school about something, when their kid doesn't go there any more for any reason.



> Maybe there should be a separate database of historic students who used to go to that school, and currently enrolled.

Or, rather than duplicating data, just use a view with appropriate criteria to limit to currently active, living students for most queries. But a developer that's called into build a query generally isn't going to get a lot of mileage out of suggesting rearchitecting the database, in either of those ways.


> But a developer that's called into build a query generally isn't going to get a lot of mileage out of suggesting rearchitecting the database, in either of those ways.

It's like you were there :)

It was a third party product so changing the structure was out of the question. We had some views but they pulled in the entire database and ended up with so much duplicate and irrelevant information they were unusable.

I tried creating a clean set of views like "v_currentStudents" that could then be joined on for information relevant to the current report. I even built a small test suit for them, but getting the support devs (who I was covering for when this happened) to change their cowboy ways was too hard. Management didn't like they idea either, cut into the billable hours.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: