TAILIEUCHUNG - Hướng dẫn học Microsoft SQL Server 2008 part 11

Để sử dụng sơ đồ tổ chức tiêu chuẩn là một ví dụ, mỗi tuple trong thực thể nhân viên đại diện cho một nhân viên. Mỗi nhân viên báo cáo cho một giám sát viên người cũng được liệt kê trong thực thể nhân viên. | Part I Laying the Foundation To use the standard organization chart as an example each tuple in the employee entity represents one employee. Each employee reports to a supervisor who is also listed in the employee entity. The ReportsToID foreign key points to the supervisor s primary key. Because EmployeelD is a primary key and ReportsToID is a foreign key the relationship cardinality is one-to-many as shown in Figure 3-12. One manager may have several direct reports but each employee may have only one manager. FIGURE 3-12 The reflexive or recursive relationship is a one-to-many relationship between two tuples of the same entity. This shows the organization chart for members of the Adventure Works IT department. Contact O- Primary Key ContactID Foreign Key ReportsToID Ken Sanchez NULL Jean Trenary Ken Sánchez Stephanie Conroy Jean Trenary François Ajenstat Jean Trenary Dan Wilson Jean Trenary A bill of materials is a more complex form of the recursive pattern because a part may be built from several source parts and the part may be used to build several parts in the next step of the manufacturing process as illustrated in Figure 3-13. FIGURE 3-13 The conceptual diagram of a many-to-many recursive relationship shows multiple cardinality at each end of the relationship. An associative entity is required to resolve the many-to-many relationship between the component parts being used and the part being assembled. In the Materialspecification sample database the BoM 62 Relational Database Design bill of materials associative entity has two foreign keys that both point to the Part entity as shown in Figure 3-14. The first foreign key points to the part being built. The second foreign key points to the source parts. FIGURE 3-14 The physical implementation of the many-to-many reflexive relationship must include a associative entity to resolve the many-to-many relationship just like the many-to-many two-entity relationship. Part Primary Key ContactID .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.