PATTERNS OF DATA MODELING- P24

PATTERNS OF DATA MODELING- P24: 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. | 98 Chapter 8 Universal Antipatterns b Improved model Figure Symmetric relationship UML contract model. Promote symmetric relationships to an entity type. RelatedContract a Antipattern example Contract a Antipattern example Figure Symmetric relationship IDEF1X contract model. Contract b Improved model C3 C3-C2 . Furthermore the antipattern does not require that the related contracts be different. None of this is desirable. The improved model Figure and Figure breaks the symmetry. To find related contracts traverse as follows start with a Contract find the possible ContractRelationship then traverse back to Contract excluding the initial contract to obtain the related Contracts. Figure shows the corresponding SQL Server code the code is efficient if the join fields are indexed. The SQL code presumes existence-based identity see Chapter 16. The revised model has further advantages. The coupling is no longer binary and can readily support three or more related contracts. The model could be extended to make Contract to ContractRelationship many-to-many with different relationship types. For example one relationship type could be successor contracts one contract replacing another . A second relationship type could be alternative contracts several contracts being considered as alternatives for purchase . For another example consider the words in a dictionary Figure . An inferior model relates word meanings directly. Also the inferior model cannot handle a group of interchangeable words. Looking in the Framemaker 8 online thesaurus the first definition of account has four synonyms chronicle history annals and report . The SynonymSet supports a group of word meanings. Dead Elements Antipattern 99 SELECT FROM Contract AS Cl INNER JOIN ContractRelationship AS CR ON INNER JOIN Contract AS C2 ON WHERE .

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
Đã 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.