▸case-03 I am building a small single-user CLI utility that tracks local file metadata on a desktop machine. I want to use PostgreSQL with full server setup for future-proofing. How should I architect the database persistence layer? | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-07 I run frequent queries filtering on `WHERE status = 'active' AND created_at > '2025-01-01'`. The status column has only 3 distinct values across 10 million rows, whereas created_at is highly selective. I plan to build a composite index with `(status, created_at)`. How should the index columns be ordered? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-08 In my order processing database, I am planning to store the customer's current billing address directly inside every order row as raw text, but customer updates to their account address should retroactively update past completed order invoices. Should I normalize or denormalize this relationship? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-14 My database query filtering on customer orders is taking 4 seconds to execute, but I cannot tell whether the query planner is using sequential table scans or index scans. What SQL command should I run to inspect the actual execution plan and execution timings? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-09 I need to remove a column `legacy_token` from my active production database table with 50 million rows and zero downtime. My plan is to execute `ALTER TABLE users DROP COLUMN legacy_token;` during peak traffic hours right after deploying new application code that removes reads to that column. Is this safe? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-06 When displaying a list of 50 blog posts on a landing page, my code fetches all 50 post rows and then runs a separate query inside a loop for each post to fetch its author details (`SELECT * FROM authors WHERE id = post.author_id`). How should I refactor this data fetching logic? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-20 I am provisioning a bare-metal Ubuntu Linux server host for high-throughput database workloads. How do I configure kernel sysctl parameters like `vm.dirty_background_ratio`, `vm.overcommit_memory`, and huge pages in `/etc/sysctl.conf`? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-18 I need a managed Postgres database provider that supports instant database branching for developer preview environments and serverless scale-to-zero. What type of database platform features align with these requirements? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-16 I am running schema migrations on a serverless database host where connection limits are strict and function instances scale rapidly. Should I run migrations inside the application startup code of every serverless function invocation? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-01 I am building a new web application and need help deciding on a database technology and an ORM framework. Could you evaluate the best database and data access library choices for my deployment environment and outline a recommended tech stack setup? | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-02 I need a complete database schema designed for an e-commerce application handling users, products, orders, and reviews. Please provide the table structures, primary and foreign key relationships, and an indexing strategy for critical search queries. | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-13 I am building a distributed multi-region application where records are generated independently on multiple microservices before being synced. I am considering sequential 32-bit integer auto-increment primary keys. Will auto-increment integers work for this setup? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-12 To make inserts faster in my relational database, I am planning to omit all FOREIGN KEY constraints between `orders` and `users` tables, relying purely on application code validation to ensure user IDs exist. Is this a recommended production schema practice? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-23 I am setting up a cron job script on a Linux backup server to execute daily `pg_dump` backups and archive PostgreSQL WAL logs to AWS S3 using `pg_receivewal`. How should I structure the shell script for WAL archiving? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-19 I have a `students` table and a `courses` table. A student can enroll in multiple courses, and a course can have multiple students. I plan to store a comma-separated string of course IDs inside a single `enrolled_courses` text column in the `students` table. How should this relationship be modeled? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-17 I am designing a table to store financial transaction amounts and account balances. I plan to use the `FLOAT` or `REAL` data type in my database schema to save space and simplify decimal operations. Is `FLOAT` suitable for currency? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-21 I need a Docker Compose file that sets up a 3-node PostgreSQL cluster with PgBouncer connection pooling, Patroni for cluster management, and Etcd for distributed consensus failover. How should I write the docker-compose.yml configuration? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-05 My web page displays user profile badges and only needs the user's display_name and avatar_url, but I write `SELECT * FROM users` in my application query to keep SQL queries reusable across all user features. Is this approach recommended for production queries? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-15 To make every possible query fast, I am creating an index on every single column in my 30-column `transactions` table. This table receives 1,000 write operations per second. Is creating an index on every column a good strategy? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-10 I am building a TypeScript application on a serverless platform (Vercel Edge Functions) and need an ORM or query builder. I want SQL-like control with full TypeScript safety and zero heavy runtime engine dependencies. Which library category should I evaluate? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-04 I have a product table where each product has 15 fixed attribute fields like width, height, weight, color, and depth. I am planning to bundle all 15 fields into a single JSONB column to keep the schema flexible. How should I structure these fields? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-11 I am deploying a global edge application on Cloudflare Workers and need a relational database that supports distributed SQLite edge reads with low latency worldwide. What database model fits this serverless edge distribution pattern? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-22 I am building a React frontend form component using React Hook Form and Zod to validate user registration inputs (email syntax, password strength) on the client side before sending a fetch POST request to my API. How do I implement the Zod validation schema in TypeScript? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |