SCO 215 Lecture 5 Analysis ERDs
SCO 215 Lecture 5 Analysis ERDs
5.1. Introduction
- Data modelling is a technique for organizing and documenting a system’s data.
- During the analysis phase, analysts create process models to represent how the business
system will operate. At the same time, analysts need to understand the information that is used
and created by the business system (e.g., customer information, order information). In this
chapter, we discuss how the data that flow through the processes are organized and presented.
- 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. The data model is drawn by an iterative process in which the
model becomes more detailed and less conceptual over time. During analysis, analysts draw a
logical data model, which shows the logical organization of data without indicating how data
are stored, created, or manipulated. Because this model is free of any implementation or
technical details, the analysts can focus more easily on matching the diagram to the real
business requirements of the system.
- In the design phase, analysts draw a physical data model to reflect how the data will physically
be stored in databases and files. At this point, the analysts investigate ways to store the data
efficiently and to make the data easy to retrieve.
1
P. Chen, “The Entity-Relationship Model—Toward a Unified View of Data,” ACM Transactions on Database
Systems, 1976, 1:9–36.
The ERD also communicates high-level business rules. Business rules are constraints or guidelines
that are followed during the operation of the system; they are rules such as “A payment can be cash,
check, debit card, credit card, coupon(s), or food stamps,” “A sale is paid for by one or more
payments,” or “A customer may place many orders.” Over the course of a workday, people are
constantly applying business rules to do their jobs, and they know the rules through training or
knowing where to look them up. If a situation arises where the rules are not known, workers may
have to refer to a policy guide or written procedure to determine the proper business rules. On a
data model, business rules are communicated by the kinds of relationships that the entities share.
A well-developed ERD can provide sufficient information for database administrator to follow when
developing and maintaining database.
5.2.2 Entities
1. Entities are representations of data that is being stored. So if a DFD has been drawn, check
there should be an entity corresponding to each data store or file on the DFD.
2. Think about what groupings of data the user is going to use.
3. An entity is something we are going to hold data about.
(iii) Relationships
The association between Entities
(iv) Cardinality
- The degree of association between entities.
- A relationship’s cardinality defines the maximum number of entities of one type that can
be associated with an entity of another type.
A one-to-many (1:N) relationship is when for one instance of entity A, there are zero, one,
or many instances of entity B but for one instance of entity B, there is only one instance of
entity A. An example of a 1:N relationships is
A many-to-many (M:N) relationship is when for one instance of entity A, there are zero,
one, or many instances of entity B and for one instance of entity B there are zero, one, or
many instances of entity A. An example is employees may be assigned to no more than three
projects at a time; every project has at least two employees assigned to it.
Examples
(Chen notation)
Exercise 1
Airbnb is an online community marketplace that connects people looking to rent their homes with
people who are looking for accommodations. Airbnb users include hosts and travelers: hosts list and
rent out their unused spaces, and travelers search for and book accommodations in 192 countries
worldwide.
http://www.rachit.ca/information-modelling/entity-relationship-diagram-for-airbnb/
Exercise 2
Graphic designers create posters for a KU exhibition to illustrate a chosen global problem. Relevant
information on designers includes their name and the department they come from. A poster has a title and is
assigned an identification number, and it may be created by several graphic designers; although each
individual designer may only be involved with one poster.
(https://www.conceptdraw.com/solution-park/software-erd)
The data dictionary consists of record types (tables) created in the database by systems
generated command files, tailored for each supported back-end DBMS. Command files contain
SQL Statements for CREATE TABLE, CREATE UNIQUE INDEX, ALTER TABLE (for referential
integrity), etc., using the specific statement required by that type of database.