Đang chuẩn bị liên kết để tải về tài liệu:
PATTERNS OF DATA MODELING- P9

Không đóng trình duyệt đến khi xuất hiện nút TẢI XUỐNG

PATTERNS OF DATA MODELING- P9: Models provide the means for building quality software in a predictable manner. Models let developers think deeply about software and cope with large size and complexity. Developers can think abstractly before becoming enmeshed in the details of writing code. Although models are beneficial, they can be difficult to construct. That is where patterns come in. Patterns provide building blocks that help developers construct models faster and better. | 2.3 Structured Tree Template 21 SELECT Parent.nodeID AS parentNodeID Parent.nodeName AS parentNodeName FROM Node AS Child INNER JOIN Branch AS B ON Child.parentID B.branchID INNER JOIN Node AS Parent ON B.branchID Parent.nodeID WHERE Child.nodeID aChildNodeID Figure 2.21 Structured tree SQL query. Find the parent for a child node. SELECT Child.nodeID AS childNodeID Child.nodeName AS childNodeName FROM Node AS Child INNER JOIN Branch AS B ON Child.parentID B.branchID INNER JOIN Node AS Parent ON B.branchID Parent.nodeID WHERE Parent.nodeID aParentNodeID ORDER BY Child.nodeName Figure 2.22 Structured tree SQL query. Find the children for a parent node. 2.3.4 Sample Populated Tables Figure 2.23 shows sample structured tree tables populated with data. The ID values are arbitrary but internally consistent. 2.3.5 Examples Trees often arise in applications and sometimes the structured tree template is the best choice. Many drawing applications and user interfaces have the notion of a group. In Figure 2.24 a DrawingObject is Text a GeometricObject or a Group. A Group has two or more lesser DrawingObjects the resulting recursion yields trees of DrawingObjects. Note the further refinement from Figure 2.18 a group must include at least two DrawingObjects. Figure 2.25 is the analog to Figure 2.16. Figure 2.16 suffices if you merely need to record the reporting structure. In Figure 2.25 a Person can be a Manager or an IndividualContributor. Except for the CEO each Person reports to a Manager. The management hierarchy can be arbitrarily deep. There are material differences between Managers and IndividualContributors necessitating the use of subtypes. For example only Managers can be in charge of Departments. Many years ago the original Microsoft PC-DOS file structure was a hierarchy. Each file belonged to at most one directory. Modern operating systems permit files to belong to multiple directories as the next chapter explains. In Figure 2.26 a File may be a DataFile or a .

Đã 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.