Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Designs database schemas, writes migrations, and optimizes queries for PostgreSQL, MySQL, and NoSQL databases.
88% 92%+4 ptsof test cases passed
Passed 23 of 25 test cases with the skill, and 22 of 25 without it.
3 of 3 safety checks passed
Not used yet
-- 1NF: Atomic values, no repeating groups
-- 2NF: No partial dependencies on composite keys
-- 3NF: No transitive dependencies
-- Users table (normalized)
CREATE TABLE users (
id SERIAL PRIMARY KEY,
email VARCHAR(255) UNIQUE NOT NULL,
created_at TIMESTAMPTZ DEFAULT NOW()
);
-- Addresses table (separate entity)
CREATE TABLE addresses (
id SERIAL PRIMARY KEY,
user_id INTEGER REFERENCES users(id) ON DELETE CASCADE,
street VARCHAR(255),
city VARCHAR(100),
country VARCHAR(100),
is_primary BOOLEAN DEFAULT false
);
-- When read performance matters more than write consistency
CREATE TABLE order_summaries (
id SERIAL PRIMARY KEY,
order_id INTEGER REFERENCES orders(id),
customer_name VARCHAR(255), -- Denormalized from customers
total_amount DECIMAL(10,2),
item_count INTEGER,
last_updated TIMESTAMPTZ DEFAULT NOW()
);
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.