A DB-first approach to query factual information in LLMs