What particular RADIUS server are you using? I’ve worked with RADIUS before, and each one has it’s own way of using db-based authentication. Usually however, the RADIUS server has a predefined table structure you need to create. The query that is used to perform the authentication is usually a stored procedure that is executed everytime a connection request is made. Your RADIUS server’s documentation should tell you the table structure you need to create as well as provide you with a template on the stored procedure you need to write.