Title: Modeling Objects and Classes, attributes, and relationships
1Modeling Objects and Classes, attributes, and
relationships
- Data modeling
- Object structure analysis and design
- Logical data design
2Data modeling
- Entity - person, place, thing, event or concept
where data is collected and maintained for this - Object structure analysis and design
fundamental construct an object class with
attributes and methods - Where do find out what data is used/needed?
- Modeling the data
- ERD to Object relationship model
3Logical data modeling concepts
- Entity only focus on data not methods
- Object Class both data and methods
- Attributes properties about an entity
- Instance of an object class
- Each object has a unique identifier (system
maintained) - Relationship how one entity/object is related
to another
4Relationship
- Cardinality minimum to maximum
- Cardinality is determined by business rules
- Each employee has maximum of three phone numbers
- Student can take up to six courses
5Traditional Data modeling techniques
- Entity-Relationship diagram
- Entity and relation direction and cardinality
6Object-oriented modeling technique Object
relationship model
- Object classes, attributes, and their
relationship - Cardinalities figure D.3
- 0 to 1, 1 to 1, 0 to many, 1 to many, many to
many - Collaboration relationship one instance of
needs data contained in another instance - Sales-transaction and customer
7Specialization the IS-A relationship
- Subclass child
- Superclass parent
- Inheritance
8Composition Has-A relationship
- One object is composed of one or more instances
of another object class sales transaction has
an st-line - Figure D.8
9Figure D.8a various examples
10Identifying object classes, relationships, and
attributes
- Identifying classes candidate classes from the
enterprise models - Each class has data that must be retained
- More that one attribute for a class
- All instances have same attributes and methods
11Identifying object classes, relationships, and
attributes
- Identifying relationships
- How do the classes relate to each other
- Any special or composition relationships
12Identifying object classes, relationships, and
attributes
- Identifying object attributes
- What level of object gets the attribute
- Each attribute only once in the object model
- Attribute assigned to the class it most logically
describes - Bank accounts
- Account number
13Object relationship model