Download presentation
Presentation is loading. Please wait.
Published byBenjamin Walker Modified over 8 years ago
1
C_ITIP211 LECTURER: E.DONDO
2
Unit 4 : DATA MODELING
3
Define key data-modeling terms Conceptual data model Entity-Relationship (E-R) diagram Entity type Entity instance Attribute Candidate key Multivalued attributes Relationship Degree Cardinality Associative entity Distinguish between unary, binary and ternary relationships Discuss relationships and associative entities Discuss relationship between data modeling and process modeling
4
Focuses on representation of organizational data Purpose is to show rules about the meaning and interrelationships among data Entity-Relationship (E-R) diagrams are commonly used to show how data is organized Main goal of conceptual data modeling is to create accurate E-R diagrams Methods such as interviewing, questionnaires, and JAD are used to collect information Consistency must be maintained among process flow, decision logic, and data modeling descriptions
5
Step 1: ◦ Develop a data model for the system being replaced Step 2: ◦ New conceptual data model is built that includes all the requirements of the new system Step 3: ◦ Design stage, the conceptual data model is translated into a physical design Step 4: ◦ Project repository links all design and data modeling steps performed during SDLC
7
ERD is a key tool for modelling systems data and used to design a relational database Entity-Relationship (E-R) Diagram ◦ A detailed, logical, and graphical representation of the entities, associations and data elements for an organization or business Notation uses three main constructs ◦ Data entities ◦ Relationships ◦ Attributes
8
Entity: YOU Relationships: how you are related to other entities- e.g. Course, Book, Employer, etc. Attributes: your name, date of birth, hair colour, height, and so on.
9
Entity ◦ A person, place, object, event or concept in the user environment about which the organization wishes to maintain data ◦ Represented by a rectangle in E-R diagrams Entity Type ◦ A collection of entities that share common properties or characteristics Entity Instance ◦ Single occurrence of an entity type
10
Entity: STUDENT Entity type: Intelligent entity Entity instance 1: “Jack Wilson” Entity instance 2: “Neo Mokoena”
11
Attribute ◦ A named property or characteristic of an entity that is of interest to an organization ◦ Examples : studentNumber employeeName [the Name(attribute) of the Employee(entity)] productColour departmentName productWeight bookAuthor studentSurname
12
Attribute Keys ◦ Each entity type must have an attribute or set of attributes that distinguishes one instance from other instances of the same type. ◦ Basically three types of identifiers: Primary/Candidate key Foreign Key Multivalued Attribute
13
◦ *Primary/Candidate key (PK) An attribute that uniquely identifies each instance of an entity type. It mustn’t change over its lifetime – e.g. studentID, not studentAge ◦ *Foreign Key (FK) is normally the PK from the main entity that is added to another entity. ◦ Multivalued Attribute An attribute that may take on more than one value for each entity instance E.g. a LECTURER (entity) may have obtained more than one DEGREE (attribute), so {lecturerDegree} is multivalued.
14
Relationship ◦ An association between the instances of one or more entity types that is of interest to the organization ◦ Relationships are always labeled with verb phrases ◦ Relationships always flow in two directions and are, therefore, bi-directional. ◦ Example: An employee must work for a department. A department may consist of one or more employees.
15
Degree › Number of entity types that participate in a relationship › Unary A relationship between the instances of one entity type An EMPLOYEE manages an EMPLOYEE (because a manager is also an employee). › Binary A relationship between the instances of two entity types An EMPLOYEE works for a DEPARTMENT. › Ternary A simultaneous relationship among the instances of three entity types Not the same as three binary relationships A CUSTOMER places an ORDER with a SALESCLERK.
17
The number of instances of entity B that can be associated with each instance of entity A Minimum Cardinality › The minimum number of instances of entity B that may be associated with each instance of entity A Maximum Cardinality › The maximum number of instances of entity B that may be associated with each instance of entity A
18
*A customer may place many zero or many orders. (crowfoot notation) *An order must be placed by one customer for the order to exist. *A minimum of zero and a maximum of ten orders are allowed per customer.
19
The name of a relationship should not be too long and should capture the essence of the relationship E.g. A customer “places” an order and an order “is placed by” a customer. it helps to read the relationship names aloud in both directions to ensure that it makes sense within the context being analysed
21
An entity type that associates the instances of one or more entity types and contains attributes that are peculiar to the relationship between those entity instances
22
Step 1: ◦ Identify the entities Step 2: ◦ Identify the attributes for each entity Step 3: ◦ Identify the relationships, including the degrees and cardinality Step 4: ◦ Name the relationships Step 5: ◦ Draw the ERD
24
Process of Conceptual Data Modeling ◦ Deliverables ◦ Gathering information Entity-Relationship Modeling ◦ Entities ◦ Attributes ◦ Candidate keys and identifiers ◦ Multivalued attributes Degree of Relationship Cardinality Associative Entities
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.