"Ascending" search based on user input from dropdown selectors


#1

Hey everyone!

I have a database of elementary schools. My goal is to allow the user to select their elementary school based on state, school district, then school name. The system will then pop out the address of the school.

There are going to be over 100,000 records in the system…so I’d rather not just blast the user with all 100k records on page load, as that would be some insane load time. So, I’d like the user to select the state, and the system to query the database and populate the school district dropdown by state, then the user selects the school district and the schools drop down is populated by a similar query, etc. The flow would be select state --> select school district --> select school.

My thoughts are to execute a query on blur each time a field is “selected” and user leaves the element. Would this be an appropriate solution?

Thank you.