← Tüm Engine'ler
Structured · Relational

Amazon Aurora PostgreSQL

Domain dilimi: müşteriler ve siparişler

Neden bu Engine?

Sabit şemalı, birbirine bağlı veriler (müşteri → sipariş → sipariş kalemi) ve ACID transaction gerektiğinde. JOIN, foreign key ve ad-hoc SQL raporlama güçlüdür. Serverless v2 kapasiteyi ACU olarak otomatik ölçekler.

Veri modeli

DROP TABLE IF EXISTS order_items, orders, products, customers;
CREATE TABLE customers (customer_id text PRIMARY KEY, name text NOT NULL, email text UNIQUE,
                        city text, segment text, created_at timestamptz);
CREATE TABLE products  (product_id text PRIMARY KEY, name text, category text, price numeric(10,2));
CREATE TABLE orders    (order_id text PRIMARY KEY, customer_id text REFERENCES customers,
                        order_date timestamptz, status text, total numeric(12,2));
CREATE TABLE order_items (order_id text REFERENCES orders, product_id text REFERENCES products,
                          qty int, unit_price numeric(10,2), PRIMARY KEY (order_id, product_id));
CREATE INDEX ON orders (customer_id);

1 · Seed: veri üret ve yaz

E-ticaret Domain'inden sentetik veri üretir ve sadece bu Engine'e yazar. Tekrar basarsanız eski veri silinip yeniden üretilir.

2 · Read: geri oku

Az önce yazılan veriyi bu Engine'e en uygun erişim deseniyle okur.