Uml Diagrams
Uml Diagrams
2 E-R DIAGRAMS
An entity relationship diagram is a graphical representation of an organizations data storage requirements. Entity relationship diagrams are abstractions of the real world which simplify the problem to be solved while retaining its essential features. Entities: 1. An entity is an object of concern used to represent the things in the real world. e.g., car, table, book etc. 2. An entity need not be a physical entity, it can also represents a concept in real world, e.g., project, loan etc. Attributes: An attribute is a property used to describe the specific feature of the entity. So to describe an entity entirely, a set of attributes is used. For example, a student entity may be described by the students name, age, address, etc. Relationships: A relationship can be defined as: A connection or set of associations, or A rule for communication among entities.
E-R Diagram: We can also express the overall logical structure of a database using ER model graphically with the help of an E-R Diagram. Features of E-R Diagram: The basic features of ER diagrams are sufficient to design many database situations. However, with more complex relations, it is required to move to enhanced features of ER models, the three such features are:
ER diagrams are composed of Rectangles representing entity sets. Ellipses representing attributes. Diamond representing relationship sets.
Entity
Relationship
Identifying Relationship
Weak Entity
Attribute
HiderNa me passwo rd
passwor d
decri pt StegoIma ge
imagety pe
imagesi ze
classes, attributes, and relationships. There is also a notation for modeling the dynamic elements of a design such as objects, messages, and finite state machines. The unified modeling language allows the software engineer to express an analysis model using the modeling notation that is governed by a set of syntactic semantic and pragmatic rules. 4.3.1 USE CASE DIAGRAM: A use case is a set of scenarios that describing an interaction between a user and a system. A use case diagram displays the relationship among actors and use cases. The two main components of a use case diagram are use cases and actors.
An actor is represents a user or another system that will interact with the system you are modeling. A use case is an external view of the system that represents some action the user might perform in order to complete a task.
4.3.2 SEQUENCE DIAGRAM UML sequence diagrams are used to to represent or model the flow of messages, events and actions between the objects or components of a system. Time is represented in the vertical direction showing the sequence of interactions of the header elements, which are displayed horizontally at the top of the diagram. Sequence Diagrams are used primarily to design, document and validate the architecture, interfaces and logic of the system by describing the sequence of actions that need to be performed to complete a task or scenario. UML sequence diagrams are useful design tools because they provide a dynamic view of the system behavior which can be difficult to extract from static diagrams or specifications. Notations used in sequence diagram
Send message
Return message
4.3.3 CLASS DIAGRAM Class diagrams are widely used to describe the types of objects in a system and their relationships. Class diagrams model class structure and contents using design elements such as classes, packages and objects. Class diagrams describe three different perspectives when designing a system, conceptual, specification, and implementation. These perspectives become evident as the diagram is created and help solidify the design. Classes are composed of three things: a name, attributes, and operations. Below is an example of a class. Notations used in Class diagram
Simple Class
Dependency relationship
Association relationship
Realization relationship
4.3.4 ACTIVITY DIAGRAM Activity diagrams describe the workflow behavior of a system. Activity diagrams are similar to state char diagrams because activities are the state of doing something. The diagrams describe the state of activities by showing the sequence of activities performed.
Activity diagrams can show activities that are conditional or parallel. Activity diagrams should be used in conjunction with other modeling techniques such as interaction diagrams and state char diagram The main reason to use activity diagrams is to model the workflow behind the system being designed. Activity Diagrams are also useful for: analyzing a use case by describing what actions need to take place and when they should occur Simple Activity diagrams consist of:
Initial node
Represented by a fat black dot There can be only one initial (starting) node
Final node
A fat black dot inside a circle (bull's eye symbol) A circle with an x represents the end of a flow (not the whole activity)
Action node
4.3.5 COMPONENT DIAGRAM A component diagram shows a set of component and their relationship graphically, a component diagram is a collection of vertices and arcs. A component diagram is just a special kind of diagram and shares the same common properties as do all other diagrams- a name and graphical components that are a projection into a model. Component diagrams commonly contain Components Interfaces Dependency, Generalization, association and realization relationships Like all other diagrams, component diagrams may contain notes and constraints. Component diagrams may also contain packages or subsystems, both of which are used to group elements of our model into large chunks. Notations used in Component diagram:
Component
Dependency
Association
Generalization
Processor
Device