Software Development · Manufacturing

Plan a database schema from requirements for Manufacturing

Use this before you start building, to get a database design you will not have to rebuild later. Written for a manufacturing plant running shift-based production lines.

Your prompt is ready 4 brackets to fill
You are a senior database architect, working with plant managers, line operators and procurement teams at a manufacturing plant running shift-based production lines.

## Goal
Design a clean, normalised database schema for a new feature or app, ready to turn into migrations.

## What matters in Manufacturing
- Rules and standards that usually apply: ISO 9001 quality management; worker-safety law (OSHA in the US, the Factories Act and labour codes in India) and ISO 45001; lockout/tagout and machine guarding; ISO 14001 and pollution-control consents; product marks such as CE or BIS certification.
- Common risks to plan for: machine breakdowns; supplier delays and raw-material price swings; quality escapes reaching customers; worker injuries; errors at shift handover.
- Tools commonly used: ERP such as SAP or Tally; MES; CMMS for maintenance; SPC software; Excel.
- Words people in this field use: OEE; takt time; cycle time; WIP; BOM; changeover; kaizen; 5S; SPC; CAPA.
- Rules differ by country. If I have not said where I work, ask me, and do not present one country's law as if it applied everywhere.

## What I will give you
- What the app does: [DESCRIBE THE APP OR FEATURE]
- Main things it stores: [e.g. customers, orders, products]
- Database: [MySQL / PostgreSQL / MongoDB / other]
- Expected size: [ROWS PER MONTH OR USERS]

## What to do
1. List every entity and what it represents in one line.
2. Define the tables with columns, data types, nullability and defaults.
3. Add primary keys, foreign keys, unique constraints and the indexes each common query needs.
4. Explain each relationship (one-to-many, many-to-many) and how deletes should cascade.
5. Check the design against the five most common queries the app will run.

## What to deliver
- A table-by-table schema in a markdown table
- The SQL CREATE TABLE statements (or the collection design for NoSQL)
- An entity-relationship diagram in Mermaid syntax
- A short list of trade-offs you made and when to revisit them

## Rules
- Keep safety rules, ISO 9001 quality standards and fixed production schedules in mind throughout, and point out anything in my plan that would break them.
- Where it fits, connect your recommendations to OEE and defect rate.
- Use plain language and short sentences. Use headings and tables where they make the answer easier to scan.
- Do not invent figures, laws, sources or quotes. Mark anything you had to assume with "Assumption:".
- If something important is missing, ask me up to 3 short questions before you start.

## Before you answer
Check your draft against this list and fix anything that fails:
- The code works as written: no invented libraries, functions or APIs, and versions are named where they matter.
- It is written for a manufacturing plant running shift-based production lines; nothing in it would read the same for any other business.
- Every item under "What to deliver" is included.
Open in ChatGPT Claude Perplexity

How to use this prompt

  1. Copy the prompt. Press Copy prompt and the full text goes to your clipboard.
  2. Fill the brackets. Use the form above, or replace [DESCRIBE THE APP OR FEATURE], [e.g. customers, orders, products], [MySQL / PostgreSQL / MongoDB / other], [ROWS PER MONTH OR USERS] with your own details.
  3. Paste and send. Paste it into ChatGPT, Claude, Microsoft Copilot and DeepSeek and send. Ask follow-up questions to refine the answer.

Why use this Plan a database schema from requirements prompt?

This plan a database schema from requirements prompt is written for a manufacturing plant running shift-based production lines. It tells the assistant who the answer is for (plant managers, line operators and procurement teams) and the limits it must respect: safety rules, ISO 9001 quality standards and fixed production schedules. That context is what turns a generic reply into one a Manufacturing team can use straight away.

Most people type a single line and get a generic answer back. This prompt gives the assistant the role, the context and the structure it needs, so the first answer is already close to what you would hand to your team. Because it is written for Manufacturing, it keeps the focus on what that industry measures: OEE and defect rate.

How to get the best answer

  1. Be specific in the brackets: real names, numbers and dates give a far better answer than placeholders.
  2. Paste real material: where the prompt asks for notes, data or text, paste the actual content rather than a summary.
  3. Refine in the same chat: ask "make it shorter", "turn it into a table" or "add more detail on step 2".
  4. Check the result: review it against what you know about OEE and defect rate before you share it.

Other industries

Same prompt for other industries

The same plan a database schema from requirements prompt, rewritten for each industry.

FAQ

Frequently asked questions

Which AI assistant works best with this Plan a database schema from requirements prompt?

It works in any chat assistant. It suits ChatGPT, Claude, Microsoft Copilot and DeepSeek best. Paste it in, send it, and ask follow-up questions in the same chat.

What do I need to replace before sending it?

Replace the 4 highlighted brackets – [DESCRIBE THE APP OR FEATURE], [e.g. customers, orders, products], [MySQL / PostgreSQL / MongoDB / other], [ROWS PER MONTH OR USERS] – with your own details. The more specific you are, the better the answer.

Is this prompt only for Manufacturing?

This version is written for a manufacturing plant running shift-based production lines. The same prompt is also available for 15 other industries, listed on this page.

Is it free to use?

Yes. Copy it as often as you like and use it in your own work. No sign-up is needed.

Can I trust the answer?

Treat it as a strong first draft. Check facts and figures yourself, especially anything with legal, financial, medical or safety consequences.

Keep exploring

Browse more Manufacturing prompts