1. Trang chủ
  2. » Công Nghệ Thông Tin

PATTERNS OF DATA MODELING- P29 docx

5 272 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 5
Dung lượng 152,8 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Figure 10.5 Archetype Address: UML model.. Businesses use contracts as a means for conducting com-Figure 10.6 Archetype Address: IDEF1X model.. addressRoleID AddressRole addressRoleTypeI

Trang 1

124 Chapter 10 / Archetypes

The Actor archetype is highly generic You can capture data for individual actors either

by using softcoded values (see Chapter 13) or by creating specific entity types as this chapter does for customer (Section 10.7) and vendor (Section 10.20)

10.3 Address

An Address is a means for communicating with an Actor (Figure 10.5, Figure 10.6) An ad-dress can be a postal adad-dress, email adad-dress, phone number, or URL An adad-dress can serve

various purposes (AddressRoleTypes, see Section 10.18) such as shipping, billing, business,

and home Thus the same address might be used both as a business address and a home ad-dress

10.4 Asset

An Asset is something of value (Figure 10.7, Figure 10.8) An OwnedAsset is an asset that

is owned outright A RentedAsset is the use of an OwnedAsset for some time period Thus, for example, a bicycle that is owned is an OwnedAsset A bicycle that is rented for some time period is a RentedAsset An OwnedAsset may or may not be individually identified — if an OwnedAsset lacks identity, AssetOwnership can involve a multiple quantity.

For another example, consider a timeshare The underlying property is an OwnedAsset The timeshare itself is a RentedAsset available for some time interval Timeshares can be

is-sued for a particular unit but are often tradeable and substitutable by a comparable unit

Figure 10.5 Archetype Address: UML model An Address is a means

for communicating with an actor

Address

name creationDate comment

AddressRole

PostalAddress EmailAddress PhoneNumber

countryCode emailAddress

AddressRoleType

name {unique}

URL

url areaCode

localPhoneNum

street

city

stateProvince

postalCode

country

1

*

Trang 2

10.5 Contract

A Contract is an agreement for the supply of products (Figure 10.9, Figure 10.10) (Section

10.17 discusses Product.) Many Actors (various persons and organizations in a variety of

roles) can participate in a contract Businesses use contracts as a means for conducting

com-Figure 10.6 Archetype Address: IDEF1X model

addressDiscrim

addressID

Address

addressName creationDate comment addressDiscrim

EmailAddress

emailAddressID (FK) emailAddress

PostalAddress

postalAddressID (FK)

street

URL

urlID (FK) city

stateProvince

postalCode

country

url

PhoneNumber

phoneNumberID (FK) countryCode

areaCode localPhoneNum

AddressRole_Actor

addressRoleID (FK)

actorID (FK)

actorID

Actor

.

addressRoleID

AddressRole

addressRoleTypeID

AddressRoleType

addressRoleTypeName (AK1.1) addressID (FK)

addressRoleTypeID (FK)

Asset

name

Figure 10.7 Archetype Asset: UML model An Asset is something of value.

AssetValue

value

dateOfValue

actualOrEstimated

1

*

OwnedAsset

AssetOwnership

quantity startDate endDate

*

1

Actor

1

*

RentedAsset

date startTime endTime

identifier[0 1]

Currency

name {unique}

*

1

Trang 3

126 Chapter 10 / Archetypes

merce The financial markets use contracts for trading and capture specialized details, such

as various kinds of securities, long and short quantities, as well as bid and ask price ranges

There are various ContractTypes including purchase order, sales order, construction,

lease, advertising, and employment

10.6 Course

A Course is a series of lessons about a subject (Figure 10.11, Figure 10.12). A ListedCourse

is an entry in a course catalog and is sponsored by a SchoolDistrict or some other education forum A ScheduledCourse is a specific offering of a ListedCourse and is delivered by a

Figure 10.8 Archetype Asset: IDEF1X model

assetDiscrim

assetID

Asset

assetName assetDiscrim

RentedAsset

rentedAssetID (FK) date

OwnedAsset

ownedAssetID (FK) startTime

endTime

identifier

ownedAssetID (FK)

assetValueID

AssetValue

value

dateOfValue

actualOrEstimated

assetID (FK)

currencyID (FK)

assetOwnershipID

AssetOwnership

quantity startDate endDate assetID (FK) actorID (FK)

actorID

Actor

.

currencyID

Currency

currencyName (AK1.1)

Figure 10.9 Archetype Contract: UML model A Contract is an

agree-ment for the supply of products

Contract

number

ContractType

name {unique}

Product

*

*

*

1

Actor

ContractItem

name

1 1

quantity

Trang 4

Teacher at a School using any number of Textbooks There is a CourseRegistration for each Student who participates in a ScheduledCourse Note that the Course archetype has two Item Description templates (see Chapter 5) ListedCourse corresponds to ItemDescription and ScheduledCourse corresponds to Item Similarly, ScheduledCourse corresponds to ItemDe-scription and CourseRegistration corresponds to Item.

10.7 Customer

A Customer is someone involved in the purchase of products (Figure 10.13, Figure 10.14)

Customer reifies the customer role for a TangibleActor (in this case a person or organization,

Figure 10.10 Archetype Contract: IDEF1X model

actorID

Actor

productID

Product

.

contractTypeID

ContractType

contractTypeName (AK1.1)

contractID

Contract

contractNumber contractTypeID (FK)

Contract_Actor

contractID (FK) actorID (FK) contractItemID

ContractItem

contractItemName

quantity

productID (FK)

contractID (FK)

Figure 10.11 Archetype Course: UML model A Course is a series of

lessons about a subject

ListedCourse

name

ListedLesson

name scheduledDuration

School

name

*

1 {ordered}

ScheduledCourse

startDate endDate

Student

name

Teacher

name

*

1

CourseRegistration

registrationDate terminationDate

*

1

*

1

SchoolDistrict

name

1

*

1

*

*

1

*

1

grade

Textbook

name

Trang 5

128 Chapter 10 / Archetypes

see Section 10.2) Customers are critically important to business and there is special data to collect for them, such as sales data, credit information, and discount schedules You could use softcoding (see Chapter 13) to capture customer data, but an alternative is to define a

dis-tinct Customer entity type as shown here.

10.8 Document

A Document is a physical or electronic representation of a body of information (Figure 10.15, Figure 10.16)

Figure 10.12 Archetype Course: IDEF1X model

schoolID

School

schoolName

schoolDistrictID (FK)

schoolDistrictID

SchoolDistrict

schoolDistrictName

studentID

Student

studentName

schoolID (FK)

courseRegistrationID

CourseRegistration

registrationDate terminationDate grade

studentID (FK) scheduledCourseID (FK)

scheduledCourseID

ScheduledCourse

startDate endDate schoolID (FK) teacherID (FK) listedCourseID (FK)

listedCourseID

ListedCourse

listedCourseName schoolDistrictID (FK)

teacherID

Teacher

teacherName

schoolDistrictID (FK)

listedLessonID

ListedLesson

listedLessonName scheduledDuration listedCourseID (FK) (AK1.1) sequenceNumber (AK1.2)

textbookID

Textbook

textbookName

SchedCourse_Textbook

scheduledCourseID (FK) textbookID (FK)

0 1

salesData 1

creditInformation discountSchedules

Figure 10.13 Archetype Customer: UML model A Customer is someone

involved in the purchase of products

Ngày đăng: 05/07/2014, 06:20