Build a Staff Directory Application
/d1/tutorials/build-a-staff-directory-app
Mở tutorial / guide ↗ Open tutorial / guide ↗Lộ trình đang học Current learning path
Developer Platform Developer Platform
Build và deploy apps trên Cloudflare. Build and deploy apps on Cloudflare.
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 ↗
Ví dụ chính thức từ Cloudflare Resources — gợi ý theo chủ đề bài học trong lộ trình này. Official examples from Cloudflare Resources — matched to this lesson within this path.
/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 ↗Xem thêm ví dụ trong lộ trình → More examples in this path →
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
Ba lộ trình độc lập — mỗi lộ trình chỉ gồm bài học và tài liệu trong phạm vi đó. Chọn lộ trình khác khi sẵn sàng, không cần học song song. Three independent paths — each includes only lessons and materials for that scope. Switch when you are ready; no need to study paths in parallel.
Bảo vệ và tăng tốc website, application và API Protect and accelerate websites, applications, and APIs
Vào lộ trình này → Enter this path →Bảo vệ users, access, SaaS và mạng doanh nghiệp Secure users, access, SaaS, and corporate networks
Vào lộ trình này → Enter this path →Chưa chắc — làm bài chọn lộ trình Not sure — use the path selector · So sánh cả ba lộ trình Compare all three paths