Entity Relationship Design From a Business Description
Turn a business description into an entity relationship design: entities, attributes, relationships and cardinality to review.
The Open buttons send the prompt text as currently shown below to that site only when you click. Fill in the placeholders first.
Design a database from this description: [BUSINESS_DESCRIPTION]. Questions the data must answer: [KEY_QUESTIONS]. Database system: [DATABASE]. Expected size: [EXPECTED_SIZE]. Identify entities, attributes and relationships. For each table give columns with types, primary key, foreign keys, required or optional, and unique constraints. Justify each one-to-many and many-to-many relationship, with a join table where needed. Normalise to third normal form and say where denormalising would help. Return the schema as a table per entity, a plain-text diagram using arrows, five sample queries that answer my key questions and a list of assumptions. Ask me up to five questions about unclear parts before finalising. Do not invent business rules; list them as assumptions to confirm. Add a section on naming conventions: singular or plural table names, key naming, date and time columns, and how to name join tables. Describe how to represent history, such as price changes over time, with effective dates, and how to handle soft deletion. Include three questions you would ask the business to find hidden rules, such as can an order have no customer, and show how each answer changes the schema.
Fill in before use
Optional: type your details and the prompt above updates. Nothing is saved or sent.
Replace each bracketed placeholder with your own details, then paste into Any AI or another assistant.
See an example result (fictional data)
Invented small bakery. customers(id PK, name, email unique, phone null) orders(id PK, customer_id FK to customers, order_date, status) products(id PK, name, unit_price) order_items(order_id FK, product_id FK, quantity, unit_price_at_sale, PK order_id + product_id) Relationships: one customer to many orders; orders to products many-to-many through order_items. Sample query: total per order = sum of quantity x unit_price_at_sale grouped by order_id. Assumption to confirm: unit price is stored at sale time so later price changes do not alter history. Second sample query: customers with no orders in 90 days, using a left join from customers to orders and filtering where the latest order date is older than 90 days or missing.
Illustrative only, made-up data. Your results will differ and must be reviewed.