Bỏ qua để tới nội dung chính
Đăng nhập với Microsoft
Đăng nhập hoặc tạo một tài khoản.
Xin chào,
Chọn một tài khoản khác.
Bạn có nhiều tài khoản
Chọn tài khoản bạn muốn đăng nhập.
Tiếng Anh
Chúng tôi rất tiếc. Bài viết này không có bằng ngôn ngữ của bạn.

Categories are child tables of a parent table. For example, an employee record (the parent) might contain a job-type column; category tables for that column might include engineer, technician, and administrator. Define the category by setting up the primary key in the parent table, and then setting up a foreign key in the child table, and linking the two.

Define a category in a database model diagram

  1. In Visio, on the File menu, click New > Software, and then click IDEF1X Database Notation.

  2. Choose between Metric Units or US Units, and click Create.

  3. From the IDEF1X Database Notation stencil, drag an Entity shape onto the drawing page to create a parent entity.

  4. Drag another Entity shape onto the drawing page to create a child entity.

  5. In the parent entity, click the attribute that is denoted with PK, and type the attribute name.

    In the parent entity, type the attribute name in PK.

  6. Complete the parent entity.

  7. Right-click the first attribute in the child entity, and select Insert ‘Attribute’ Before.

    Select Insert Attribute Before.

  8. Click the newly created attribute in the child entity, and type the attribute name that you entered earlier as the primary key in the parent entity.

  9. Right-click the attribute, and click Set Foreign Key.

    Click Set Foreign Key.

  10. Drag a Relationship shape onto the drawing page.

  11. Drag one end of the relationship shape to the middle of the parent entity until a green box appears around the entire shape.

  12. Connect the other end of the relationship shape to the child entity the same way.

  13. Repeat the steps for each child table.

Bạn cần thêm trợ giúp?

Bạn muốn xem các tùy chọn khác?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Thông tin này có hữu ích không?

Điều gì ảnh hưởng đến trải nghiệm của bạn?
Khi nhấn gửi, phản hồi của bạn sẽ được sử dụng để cải thiện các sản phẩm và dịch vụ của Microsoft. Người quản trị CNTT của bạn sẽ có thể thu thập dữ liệu này. Điều khoản về quyền riêng tư.

Cảm ơn phản hồi của bạn!

×