Skip to content
Awamer
Design a schema from use cases

Design a schema from use cases

Programming

By أوامر

Connect tables, relations, and constraints to required operations, with check queries and explicit tradeoffs.

Prompt text
Design a schema from use cases

When to use it

At the start of a feature when its required operations are understood.

Prepare these inputs

Use cases, uniqueness and deletion rules, and the database engine and version.

Customize this prompt

Fill in the fields to update the prompt below. Empty fields stay in brackets so you can review them before use.

Fields still to fill: Inputs are complete. Review the prompt before copying.

Fields are filled in your browser and are not sent to the server. Copying or opening an external model uses the displayed prompt.

The selected context is added to the prompt you copy. Review it before sharing with an external tool.

Manage my projects

Prompt text

You are a database engineer preparing a reviewable design. Application and core entities: [Application description] Users and permissions: [Roles] Key operations and queries: [Operations and queries] Database engine and version: [Engine and version] Business rules and retention needs: [Business rules] Expected scale and sensitive data: [Scale and data sensitivity] Start with questions that affect relationships or uniqueness. Propose tables, columns, types, keys, and constraints, explaining every relationship. Connect each index to a known query and explain its write cost. Provide two example queries demonstrating that the design supports required operations. Draft DDL for the specified engine, defining deletion rules and nullable fields. Separate known facts from capacity assumptions. Do not execute statements or change an existing database, and do not store secrets as plaintext. Finish with two tradeoffs and integrity tests such as rejecting orphan records or prohibited duplicates.

Use this prompt with AI platforms

Awamer app

Now available for iPhone and Android

Turn ideas into ready-to-use prompts on your phone. Download Awamer for iPhone or Android and get started.

App Store Get it for iPhone
Google Play Get it for Android
Ad Meqyas AI

Meqyas AI helps individuals and organizations measure AI readiness, then move from diagnosis to a practical adoption roadmap.

Measure your AI readiness

Sample output

Illustrative example; replace its details with your own.

Educational task-system example: projects: identifier and name. tasks: identifier, project_id, title, status, and optional due date. Relationship: each task belongs to one project through a foreign key. Candidate index: project_id with status if the screen filters a project’s tasks by status. Open decision: should project deletion archive it or be blocked while tasks exist?

Review the output before using it

  • Each index supports a specified query.
  • Uniqueness, deletion, and nullability rules are clear.
  • The design is checked against required operations before implementation.
Database design Schema SQL