SQL

Online Store Database Design

Updated 28 September 2026 1 min read By LaunchCV.in

Design a normalized schema for products, customers and orders and write reporting queries.

Design a normalized schema for products, customers and orders and write reporting queries.

Difficulty: Intermediate · Technology: MySQL or PostgreSQL

Features to build

  • ER diagram
  • Constraints and indexes
  • Sales report queries
  • Sample data script

Step-by-step build plan

  1. List entities and relationships
  2. Draw an ER diagram
  3. Create tables with keys and constraints
  4. Insert sample data
  5. Write ten reporting queries such as top products by month

The part most people find hard

Choosing the right keys and indexes.

How to test it

Run each query on a larger sample and check the speed.

Suggested extensions

Add user accounts, better error handling, automated tests and a README with screenshots. Each extension is a new talking point in interviews.

How to describe it on your resume

Designed a normalized e-commerce database and wrote analytical SQL queries.

Portfolio tip

Deploy it, link both the live version and the code, and write two paragraphs about what you learned and what you would improve.