Skip to main content
Back to Learning PathSession 03 — Databases & Data Management

Topic 3.2 · Relational Database ModelConcept 03 of 12

3.2 · Relational Database ModelConcept 03/12
Source: P1 · p. 52

Tables and keys

Bảng dữ liệu và vai trò của Khóa (Primary Key & Foreign Key)

Visualise & Explore

· Trực quan hóa & Tương tác

Rows, columns and the power of keys (CUSTOMERS & ORDERS)

Dòng, cột và sức mạnh của khóa (CUSTOMERS & ORDERS)

Primary keys identify; foreign keys link — eliminating repeated customer names (P1 · Page 52).

Khóa chính để định danh; khóa ngoại để liên kết — không lặp lại dữ liệu khách hàng (P1 · Trang 52).

Source: P1 · p. 52

Entity-Relationship Topology

CUSTOMERS1 : NORDERSOne customer places many orders via CustomerID foreign key.

Entity Relationships & Cardinality

  • CUSTOMERS1 : NORDERS

    One customer places many orders via CustomerID foreign key.

    Một khách hàng có thể đặt nhiều đơn hàng qua khóa ngoại CustomerID.

CUSTOMERS (CustomerID PK, Name): C-07 Phenikaa Co., C-08 Delta Ltd. -> ORDERS (OrderID PK, CustomerID FK, Date): PO-1042 C-07 03-11, PO-1043 C-07 03-12. Relationship: 1 customer -> N orders.

Understand

· Giải thích khái niệm