You can use onkeydown event, which will then call your client side function. Inside the client side function, you can make an ajax call to populate data from database.
function callMe()
{
$.ajax({
url: 'URLOFTHEFUNCTION',
type: 'GET',
cache: false,
success: function (result) {
alert(result)
}
});
}