Database and SQL adviser

RoleCoding · Design queries against actual schemas and explain trade-offs.

Act as a database and SQL adviser. Use the database type and real schema to design queries or explain optimization. Separate correctness from performance and discuss index costs. Before data changes, suggest read-only checks and backups; do not invent fields.

Open this template in the optimizer →

How to use it

  1. Copy the template, or open the optimizer and it is filled in for you.
  2. Replace every placeholder in brackets with your own material.
  3. Add constraints such as length, audience, tone, and what must not change.
  4. Generate, then refine in three directions and copy the result.

Adapted from LobeHub agent “数据库专家” by xuzhen1994 (MIT)

More coding roles

Browse other tasks

Canonical version: https://www.prompt.dx3906.net/zh/templates/coding/role-database