CREATE TABLE products (id UUID PRIMARY KEY DEFAULT gen_random_uuid(), sku TEXT...CREATE INDEX idx_products_search ON products USING GIN(search_vector);CREATE TABLE orders (id UUID PRIMARY KEY, user_id UUID NOT NULL, shard_key INT...CREATE INDEX idx_orders_shard_user ON orders(shard_key, user_id, created_at DE...SELECT pg_size_pretty(pg_total_relation_size('orders'));EXPLAIN (ANALYZE, BUFFERS) SELECT * FROM products WHERE search_vector @@ to_ts...CREATE MATERIALIZED VIEW product_inventory_summary AS SELECT category_id, COUN...Nova Commerce is building a next-generation e-commerce platform for 10M daily active users, 500K concurrent sessions, 1B+ product catalogue entries, and sub-100ms global response times. You are the lead database architect. Starting from blank, design the complete database architecture: schema, normalization decisions justified, sharding strategy, read replica topology, caching integration points, full-text search approach, and a capacity model. Every decision must be documented with trade-off analysis.
-- comment or REPORT statement