Build a Staff Directory Application
/d1/tutorials/build-a-staff-directory-app
Mở tutorial / guide ↗ Open tutorial / guide ↗Phần 3: Chọn storage đúng Part 3: Pick the right storage · Bài 2/3 Lesson 2/3
Workshop signup, quiz results, user preferences — bảng SQL nhỏ. Chạy migration với `wrangler d1 migrations`. Workshop signups, quiz results, user prefs — small SQL tables. Run migrations with `wrangler d1 migrations`.
D1 = SQLite serverless — phù hợp bảng quan hệ nhỏ/vừa, signup form, analytics nhẹ. D1 is serverless SQLite — great for small/medium relational data, signups, light analytics.
Tạo index cho cột thường dùng trong WHERE (email, user_id) hoặc ràng buộc UNIQUE. Chỉ index cột được query thường xuyên — index cũng cần ghi khi bảng thay đổi. Create indexes on columns used in WHERE clauses (email, user_id) or UNIQUE constraints. Index only frequently queried columns — indexes are updated on every table write.
Nguồn: Source: D1 — Use indexes D1 — Use indexes ↗
Tutorial, solution guide và reference từ developers.cloudflare.com/resources ↗ — gợi ý theo chủ đề bài học. Tutorials, solution guides, and reference docs from developers.cloudflare.com/resources ↗ — matched to this lesson topic.
/d1/tutorials/build-a-staff-directory-app
Mở tutorial / guide ↗ Open tutorial / guide ↗/d1/tutorials/d1-and-prisma-orm
Mở tutorial / guide ↗ Open tutorial / guide ↗/workers/tutorials/build-a-jamstack-app
Mở tutorial / guide ↗ Open tutorial / guide ↗/workers/static-assets/migration-guides/netlify-to-workers
Mở tutorial / guide ↗ Open tutorial / guide ↗Dùng khi tự động hóa bước này qua script hoặc Terraform — cần API token phù hợp. Use when automating this step via script or Terraform — requires an appropriate API token.
Fullstack applications Fullstack applications
Ví dụ fullstack trên Developer Platform — Workers/Pages, storage và AI services trong một kiến trúc thực tế. A practical example of how these services come together in a real fullstack application architecture.
Thuật ngữ: Concepts: Workers · Pages · D1 · R2 · KV · Durable Objects
Sơ đồ chính thức ↗ Official diagram ↗ · Serverless Serverless