Currently, the data layer API will retrieve all records that match or contain a substring of some string input. This may not be the best option moving forward when this data is sent to the web frontend. Imagine the end-user typing away, looking for a particular planet, and suddenly their web page grows in size with thousands of exoplanet search results.
A solution to this is just to make changes to the data layer by limiting the number of records it should grab. One issue that needs to be addressed is if a row that matches the input (i.e. uses WHERE planet_name LIKE %[input string here]%, would it be possible for it not to be included when we limit the number of rows retrieved? This is more a question of how the LIMIT clause works. If it works like this, this is an issue that must be addressed by business logic rather than by a database query.
Currently, the data layer API will retrieve all records that match or contain a substring of some string input. This may not be the best option moving forward when this data is sent to the web frontend. Imagine the end-user typing away, looking for a particular planet, and suddenly their web page grows in size with thousands of exoplanet search results.
A solution to this is just to make changes to the data layer by limiting the number of records it should grab. One issue that needs to be addressed is if a row that matches the input (i.e. uses WHERE planet_name LIKE %[input string here]%, would it be possible for it not to be included when we limit the number of rows retrieved? This is more a question of how the LIMIT clause works. If it works like this, this is an issue that must be addressed by business logic rather than by a database query.