chap4 seq10

Document Sample
chap4 seq10 Powered By Docstoc
					System Analysis and Design



     System Design


   - Mr. Ahmad Al-Ghoul
           learning Objectives

            Describe data
               relationships
              Define cardinality, and use
               cardinality notation
              Draw an entity-
               relationship diagram



                  System Analysis and Design
Avicenna                System Design          2
           Entity-Relationship Diagrams
   What Is an ERD?
          A picture showing the information created,
           stored, and used by a business system.
          ERD is network model that describes stored
           data of a system at a high level of
           abstraction.
          Entities generally represent similar kinds of
           information
          Lines drawn between entities show
           relationships among the data
          High level business rules are also shown

                         System Analysis and Design
Avicenna                       System Design               3
     Entity-Relationship Diagrams
   Representing entities
          we represent an entity by a named rectangle
          use a singular noun, or adjective + noun
          refer to one instance in naming



                                                     PART-TIME
            CUSTOMER
                                                     EMPLOYEE




                        System Analysis and Design
Avicenna                      System Design                      4
     Entity-Relationship Diagrams
   Entity types and instances
          an entity type is a classification of entity instances
          Example Ahmad
                   Amal
                   Osama



                              SUPPLIER



                            System Analysis and Design
Avicenna                          System Design                     5
           Entity-Relationship Diagrams
   Relationship
          is an association between two entities

          we may wish to store information about the association
          Relationships should have active verb names

          often recognised by a verb or
           "entity + verb + entity"

                              eg CUSTOMER places ORDER
          relationships capture the "business rules" of the system
          The first entity in the relationship is the parent entity; the
           second entity in the relationship is the child entity
          Relationships go in both directions

                               System Analysis and Design
Avicenna                             System Design                          6
     Entity-Relationship Diagrams
   A Relationship Type is a relevant business association
    between two Entity Types.
   A Relationship is an occurrence of a relationship type.


           Marketing        employs                 Yosef Ali
           Finance          employs                 Osama Mlkawi
           MIS              employs                 Ahmad Al ghoul


              DEPT           employs
                              employs                EMPLOYEE



                       System Analysis and Design
Avicenna                     System Design                           7
         Entity-Relationship Diagrams

   Types of
    Relationships
       Three types of
        relationships can exist
        between entities
       One-to-one
        relationship (1:1): One
        instance in an entity
        (parent) refers to one
        and only one instance
        in the related entity
        (child)


                           System Analysis and Design
    Avicenna                     System Design          8
     Entity-Relationship Diagrams
   Types of
    Relationships
          One-to-many
           relationship
           (1:M): One
           instance in an
           entity (parent)
           refers to one
           or more
           instances in
           the related
           entity (child)
                        System Analysis and Design
Avicenna                      System Design          9
           Entity-Relationship Diagrams
   Types of Relationships
          Many-to-many
           relationship (M:N):
           exists when one
           instance of the first
           entity (parent) can
           relate to many
           instances of the second
           entity (child), and one
           instance of the second
           entity can relate to
           many instances of the
           first entity.




                             System Analysis and Design
Avicenna                           System Design          10
         Entity-Relationship Diagrams
   Types of Relationships
       Many-to-many relationship (M:N):
          this relationship can not
           represent physically so we solve
           this problem by dividing it to two
           (1:M) relationships.
          The relationship between
           STUDENT and CLASS is many-to-
           many, one student can take
           many classes, and one class can                      Associative
           have many students.                                  Entity
          To solve the problem of this
           relationship note that the event
           or transaction that links the two
           entities is actually a third entity,
           called Associative entity that has
           its own characteristics.
          In the next section
           (normalization) you will see how
           we will solve this problem.


                                   System Analysis and Design
    Avicenna                             System Design            11
     Entity-Relationship Diagrams

   Cardinalities in relationships
          The cardinality of a relationship is the number
           of instances of one entity type that may be
           associated with each instance of the other
           entity type.
          An analyst can model this interaction by
           adding cardinality notation, which uses special
           symbols to represent the relationship.

                        System Analysis and Design
Avicenna                      System Design             12
     Entity-Relationship Diagrams

   Cardinality
            Cardinality notation: Notation that shows
             relationships between entities.
            Crow’s foot notation: A type of cardinality notation.
             It is called crow's foot notation because of the
             shapes, which include circles, bars, and symbols,
             that indicate various possibilities. A single bar
             indicates one, a double bar indicates one and only
             one, a circle indicates zero, and a crow's foot
             indicates many.
                          System Analysis and Design
Avicenna                        System Design                   13
      Entity-Relationship Diagrams




Crow's foot notation is a common method of indicating cardinality. The
four examples show how you can use various symbols to describe the
relationships between entities.

                          System Analysis and Design
 Avicenna                       System Design                       14
            Entity-Relationship Diagrams
In the first example of cardinality
notation, one and only one
CUSTOMER can place anywhere from
zero to many of the ORDER entity. In
the second example, one and only
one ORDER can include one ITEM
ORDERED or many. In the third
example, one and only one EMPLOYEE
can have one SPOUSE or none. In the
fourth example, one EMPLOYEE, or
many employees, or none, can be
assigned to one PROJECT, or many
projects, or none.




                         System Analysis and Design
 Avicenna                      System Design          15
     Entity-Relationship Diagrams
   The entity-relationship diagram may be used to
    determine record keys
          When the relationship is one-to-many, the primary
           key of the file at the one end of the relationship
           should be contained as a foreign key on the file at the
           many end of the relationship
          A many-to-many relationship should be divided into
           two one-to-many relationships with an associative
           entity in the middle

                           System Analysis and Design
Avicenna                         System Design                  16
              Sequence Summary
   An entity-relationship diagram (ERD) is a graphic
    representation of all system entities and the
    relationships among them
   The ERD is based on entities and data stores in DFDs
    prepared during the systems analysis phase
   The three basic relationships represented in an ERD
    are one-to-one (1:1), one-to-many (1:M), and many-
    to-many (M:N)
   In a M:N relationship, the two entities are linked by an
    associative entity
   The relationship between two entities also is referred
    to as cardinality
   A common form if cardinality notation is called crow’s
    foot notation, which uses various symbols to describe
    the characteristics of the relationship

                      System Analysis and Design
Avicenna                    System Design                 17
            Sequence Summary
   In this Sequence we have
      Defined entity relationship diagram (ERD)
      Defined and distinguished between entity
       type and entity instance
      Defined and distinguished between
       relationship and relationship type
      Explained types of relationships
      Defined cardinality, and used cardinality
       notation

                   System Analysis and Design
Avicenna                 System Design             18
             Reference

[1] System Analysis and Design, Sixth
  Edition
   Authors: Gary B. Shelly, Thomas J.
  Cashman and Harry J. Rosenblatt
   Publisher: SHELLY CASHMAN SEWIES.



              System Analysis and Design
Avicenna            System Design          19

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:0
posted:2/16/2013
language:English
pages:19