Unit 6 Flashcards
Data Modeling
Data modeling represents the data view of the building blocks of a system
Note that the building blocks of the system model is classes/objects
The attributes of classes represent the data associated with the system
So, a data model uses classes, attributes, and relationships among classes.c
Documenting Data used in Use Cases
The Use Case Diagram and Use Case Descriptions describe business processes and process logic
•They refer to but do not describe the data used by these processes
•So, data used by each use case will have to be documented; We call this documentation as the data dictionary
•Data Dictionary contains
1. the composition of data used within a Use Case in terms of data elements
2. the units, types, sample values, and other notes relevant for each data element
Review Use case description for Calculate trip cost (Slide 5)
Do it
Data Dictionary Notation
There are two types of data represented in a data dictionary
Data Element –primitive data item
Aggregate Data –composed of several data elements organized in a specific structure
For instance, suppose customer name is represented using first name, middle initial, and last name, and each of these parts of the customer name is not decomposed further (or it is not meaningful to decompose them further). Then, first name, middle initial, and last name are data elements, but customer name (as a whole) is aggregate data
Data elements do not have any specific notation to describe; however, aggregate data require specific notation to describe the structure
Data Dictionary Notation to model aggregate data
symbol meaning = is composed of \+ and () optional [] select one of several choices | alternative choices in [] {} repetition, or iteration
Data Dictionary Notation
order = customer-name + shipping-address + customer-type + 1{item}10
Customer-name = First name + (middle initial) + last name
customer-type = [govt|private]
The above states that an order consists of one customer-name, one shipping address, one customer type, and at least one and a maximum of 10 items. All data elements are mandatory in an order. The customer-type will have one of the two values: govtor private. The middle initial is optional in a customer’s name.
Description of Data Elements
General data element name, aliases definition Format Type, Length, Picture, Measurement unit Control Sourceaccess and update authorizationssecurity Example: Date Element Name: Customer NumberAlias: Account NumberType: NumericLength: 5Picture: 99-999Source: New customer creation processUpdate: cannot be updated …
Classes As Building Blocks
Classes are the building blocks of data modeling
Objects are the data units of the actual information system
Review Finding Class Candidates Slide (11)
Do it
Data Dictionary
Medical service = Service Code + Service name
Patient personal data = patient # + patient name + gender + date of birth
Patient contact data = address + {phone number} + email address
Appointment = patient# + service code + appointment date + appointment time + {physician name}
Identifying Classes
Aggregate date are typically modeled as classes
Example: medical service and patient as classes
Data within a repeating group is typically modeled as a class
Item in the order example discussed previously
Data elements are typically modeled as attributes
Example: Service Code and Service name are attributes; since they are contained in medical service which is modeled as a class, they become attributes of the medical service class.
Relationships
When an aggregate data is modeled using two or more classes, then there is probably a relationship among these classes
Appointment class is likely to be related to patient class and doctor class
Association
Aggregation
Generalization
Association
Association is a structural relationship that defines the link between objects of one class with the objects of another class
Types of Associations
Binary Association
Associations between exactly two different classes
•Course Section includes Students
•Members join Club
Unary Association (recursive)
Associations between two instances of the same class
•Person married to person
•A course has other courses as prerequisites
Ternary Association (three)
N-aryAssociation (between n)
Multiplicity
Multiplicity specifies how many instances of one class can associate with instances of another class. Associations have minimum and maximum multiplicity
minimum is zero, the association is optional
If minimum is at least one, the association is mandatory