How do you tie a database to a block?


I am rather new to wordpress, and need help tying a database to a block and get it to function like a search engine for a candidate.