Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 27
System Analysis and Design
Data Modeling Introduction • A data model describes the data that flow through the business processes in an organization.
• A data model is a formal way of representing the data that
are used and created by a business system; it illustrates people, places, or things about which information is captured and how they are related to each other.
• Entity relationship diagram is one of the most common data
modeling techniques used in industry. The Entity Relationship Diagram • An entity relationship diagram (ERD) is a picture which shows the information that is created, stored, and used by a business system. An analyst can read an ERD to discover the individual pieces of information in a system and how they are organized and related to each other. • Elements of an Entity Relationship Diagram - There are three basic elements in the data modeling language (entities, attributes, and relationships), each of which is represented by a different graphic symbol. Figure 1: Symbol of Elements of Entity Relationship Diagram Elements of an Entity Relationship Diagram • Entity The entity is the basic building block for a data model. It is a person, place, event, or thing about which data is collected—for example, an employee, an order, or a product. An entity is depicted by a rectangle, and it is described by a singular noun spelled in capital letters. • All entities have a name, a short description that explains what they are, and an identifier that is the way to locate information in the entity. Entities represent something for which there exist multiple instances, or occurrences. For example, John Smith and Susan Jones could be instances of the customer entity. There is no need to capture data in the system about something having just a single instance. Elements of an Entity Relationship Diagram Cont. Elements of an Entity Relationship Diagram Cont. • Attribute An attribute is some type of information that is captured about an entity. For example, last name, home address, and e-mail address are all attributes of a customer. • One or more attributes can serve as the identifier—the attribute(s) that can uniquely identify one instance of an entity—and the attributes that serve as the identifier are noted by an asterisk next to the attribute name. Elements of an Entity Relationship Diagram Cont. Elements of an Entity Relationship Diagram Cont. • Relationship - Relationships are associations between entities, and they are shown by lines that connect the entities together. • Every relationship has a parent entity and a child entity, the parent being the first entity in the relationship, and the child being the second. • Relationships should be clearly labeled with active verbs so that the connections between entities can be understood. Elements of an Entity Relationship Diagram Cont. • Cardinality Relationships have two properties. First, a relationship has cardinality, which is the ratio of parent instances to child instances. To determine the cardinality for a relationship, we ask ourselves: “How many instances of one entity are associated with an instance of the other?” (Remember that an instance is one occurrence of an entity). • The cardinality for binary relationships (i.e., relationships between two entities) is 1:1, 1:M, or M:M. The 1:1 (read as “one to one”) relationship means that one instance of the parent entity is associated with one instance of the child entity. • More often, relationships are 1:M (read as “one to many”). In this kind of relationship, a single instance of a parent entity is associated with many instances of a child entity; however, the child entity instance is related to only one instance of the parent. Elements of an Entity Relationship Diagram Cont. • A character resembling a crow’s foot is to show the “many” end of the relationship. • A third kind of relationship is the M:M (read as “many to many”) relationship. In this case, many instances of a parent entity can relate to many instances of a child entity. • M:M relationships are depicted on an ERD by having crow’s feet at both ends of the relationship line. Elements of an Entity Relationship Diagram Cont. • Modality – the second relationship property. Relationships have a modality of null or not null, which refers to whether or not an instance of a child entity can exist without a related instance in the parent entity. Basically, the modality of a relationship indicates whether the child-entity instance is required to participate in the relationship.
• Modality is depicted by placing a zero on the relationship line
next to the parent entity if nulls are allowed. A bar is placed on the relationship line next to the parent entity if nulls are not allowed. Relationship Types Relationship Types Cont. Relationship Types Cont. Relationship Types Cont. Building Entity Relationship Diagrams • The basic steps in building an ERD are these: (1) Identify the entities, (2) add the appropriate attributes to each entity, and then (3) draw relationships among entities to show how they are associated with one another. • Step 1: Identify the Entities - the most popular way to start an ERD is to first identify the entities for the model, and their attributes. The entities should represent the major categories of information that you need to store in your system. • If the process models (e.g., DFDs) have been prepared, the easiest way to start is with them: The data stores on the DFDs, the external entities, and the data flows indicate the kinds of information that are captured and flow through the system. Building Entity Relationship Diagrams Cont. • Step 2: Add Attributes and Assign Identifiers -The information that describes each entity becomes its attributes. • Once the attributes are identified, one or more of them will become the entity’s identifier. The identifier must be an attribute(s) that is able to uniquely identify a single instance of the entity. • Step 3: Identify Relationships The last step in creating ERDs is to determine how the entities are related to each other. Lines are drawn between entities that have relationships, each relationship is labeled, and cardinality and modality is assigned. Building Entity Relationship Diagrams Cont. Building Entity Relationship Diagrams Cont. Building Entity Relationship Diagrams Cont. Building Entity Relationship Diagrams Cont. Building Entity Relationship Diagrams Cont. Building Entity Relationship Diagrams Cont. Exercise in Class • Draw an Entity Relationship Diagram to represent the following:
a. Each CLUB must be assigned to one and only one DEPARTMENT
b. Each DEPARTMENT may be responsible for one or more CLUBs c. Each STUDENT may join one or more CLUBs d. Each CLUB may be composed of one or more STUDENTs Solution to the class exercise Test 1. Differentiate between system analysis and system design. 2. Mention eight requirements analysis strategies you know 3. Define the following: i. Business requirements ii. User requirements iii. Functional requirements iv. Non-functional requirements v. System requirements vi. System specification