Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Enterprise Model
In Enterprise data modelling
Review current systems Analyze the nature of business areas to be supported Describe the data needed at a very high level of abstraction Plan one or more database development projects
Purpose state business situation and solution Deliverable request for analysis
Analysis
Implementation Maintenance
Analysis Analysis
Implementation Maintenance
Implementation Maintenance
Purpose develop technology specs Deliverable program/data structures, technology purchases, organization redesigns
Implementation Maintenance
Purpose programming, testing, training, installation, documenting Deliverable operational programs, documentation, training materials
Mini-World View Requirements Collection and Analysis Conceptual Design Data Model Mapping Physical Design
Business rule
A statement that defines or constrains some aspect of the business. It is intended to assert business structure or to control or influence the behavior of the business. Ex: A preferred customer qualifies for a 10% discount, unless he has an overdue account balance.
Customer
Depositor
Account
Rectangles represent entity sets Ellipses represent attributes Diamonds represent sets of relationships among a member from each of several entity sets Lines links attributes to entity sets and entity sets to relationships
Copyright 2012 Pratian Technologies www.pratian.com
Components of an E R Model
Entities Attributes Entity Identifiers Instances of Entities Attribute Domains
Entities
Definition
A person, place, object, event, or concept in the user environment about which the organization wishes to maintain data
Types of Attributes
Simple Attribute / Atomic Attribute
Ex: Age, Salary, Sex
Composite Attribute
Ex : Address, Full Name
E R Diagram Conventions
First name Last name
hobby
STUDENT
age
roll_number
city
pin
Entities Rectangular Box Attribute Ellipse Entity Name Uppercase Attribute Name Lowercase Primary Key - Underlined
Copyright 2012 Pratian Technologies www.pratian.com
Single Line Simple /single valued Dotted Line Derived Double Line Multivalued Components of composite attribute are shown as ellipses emanating from the composite attributes
Key Attributes
Key is an attribute, or a minimal set of attributes, that uniquely identify entities in an entity set.
Composite Identifier
An identifier that consists of a composite attribute Ex: Entity FLIGHT with composite identifier flightID FlightID has component attributes flightno and date
Non-key Attributes
Non-key attributes are attributes that are not part of a key. Generally, most attributes are simply descriptive, and fall into this category. Consider attributes for first name, last name, birth date; usually these attributes are non-key attributes.
Relationships
A Relationship is an association between entities Relationship instance is an association between entity instances where each relationship instance includes exactly one entity from each participating entity type
PUBLISHER
publishes
BOOK
Degree of a relationship
Unary A unary relationship exists when an association is maintained within a single entity
EMPLOYEE
manages
Binary Relationship
A binary relationship exists when two entities are associated
PUBLISHER
publishes
BOOK
Ternary Relationship
A ternary relationship exists when there are 3 entities associated TEACHER
SUBJECT
teaches
STUDENT
Quaternary relationship
A quaternary relationship exists when there are four entities associated. TEACHER
STUDENT
studies
COURSE_ MATERIAL
SUBJECT
Copyright 2012 Pratian Technologies www.pratian.com
CONNECTIVITY
One to One
Ex: Manager manages 1 Department
One to Many
Ex: Department has many Employees
Many to Many
Ex: (No. of )Employee joins many Courses
CARDINALITY
Mapping Cardinality expresses the specific number of entity occurrences associated with one occurrence of the related entity DEPARTMENT 1 has N EMPLOYEE
(0,100) N
(1,1) N
EMPLOYEE
joins
COURSE
(0,2)
Copyright 2012 Pratian Technologies www.pratian.com
(0,10)
A cardinality constraint
Specifies the number of instance of one entity that can (or must) be associated with each instance of another entity
Minimum cardinality
The minimum number of instances of one entity that may be associated with each instance of another entity.
Maximum cardinality
The maximum number of instances of one entity that may be associated with each instance of another entity.
Participation Constraints
There are two ways an entity can participate in a relationship
Totally / Mandatory Partially / Optional
COURSE
(1,10) Optional
Employee
Assigned to
Project
Associative Entities
Its an Entity it has attributes AND its a Relationship it links entities together When should a relationship with attributes instead be an Associative Entity?
All relationships for the participating entity types are many relationships The associative entity could have meaning independent of the other entities The associative entity preferably has a unique identifier, and should also have other attributes The associative entity may participate in other relationships other than the entities of the associated relationship Ternary relationships should be converted to associative entities
Associative Entities
Associative entity involves a rectangle with a diamond inside. Note that the many-to-many cardinality symbols face toward the associative entity and not toward the other entities
AUTHOR
Submits work
PUBLISHER
PUBLISHER TABLE PUB_ID P1 NAME MCGRAW HILL CITY NEW YORK COUNTRY U.S.A
AUTHOR
N WORK
1 PUBLISHER
authorid
SUMMARY
Relationship symbols
Entity symbols
Attribute symbols
Entity with a multivalued attribute (Skill) and derived attribute (Years_Employed) Whats wrong with this?
Derived
from date employed and current date
Multivalued:
an employee can have more than one skill
Mandatory cardinalities
Question time
Please try to limit the questions to the topics discussed during the session. Thank you.