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

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

PATTERNS OF DATA MODELING- P46: 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. | 16.5 Design Identity 213 UML model IDEF1X model Region AccountType regionlD accountTypeName regionName AK1.1 1 Bank 1 Account bankID 1 accountID bankName AK1.1 regionlD fK bankID FK AK1.1 accountNum AK1.2 accountTypeName FK Figure 16.12 Existence-based lookups recommended Example. Another option is to use a mnemonic abbreviation for lookups and existence-based identity for everything else. Value-based identity. A combination of application attributes identify each entity. In Figure 16.13 names identify Region Bank and AccountType. Account is identified by bankName combined with accountNum. An advantage of value-based identity is that primary keys have intrinsic meaning. However primary key values can be difficult to change a change to a primary key may require propagation to many foreign keys. Some entities lack natural real-world identifiers. Also primary keys can become lengthy from the foreign keys of a series of related tables as Figure 16.14 illustrates. Figure 16.15 shows an awkward situation for Transaction. With value-based identity and referential integrity the two paths lead to two copies of bankID and accountNumber. With value-based identity developers must abandon referential integrity to have a single copy of the fields. Hybrid identity. A schema can combine existence-based identity with value-based identity. In Figure 16.16 Region Bank and AccountType have artificial identity and Account has identity derived from a bank reference combined with an account number. Propagated identity. Identity can also propagate from one entity type to another. In Figure 16.17 the primary key of Exercise is also the primary key for Answer. A book can have many exercises an exercise may have an answer. This is seldom a good idea as there is a leakage of information from one entity type to the other. 214 Chapter 16 Relational Database Design UML model Region AccountType regionName IDEF1X model --------1--- Bank bankName regionName FK UML model Figure 16.13 Value-based .

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