Professional Documents
Culture Documents
Department Computer
Science
of &Engineering
data.
CSE
Department Computer
Science
of &Engineering CSC 401: database Management System Database Group
THE E-R MODEL
Entity-relationship model (E-R model)
CSE
Department Computer
Science
of &Engineering CSC 401: database Management System Database Group
Sample E-R diagram
CSE
Department Computer
Science
of &Engineering CSC 401: database Management System Database Group
Entities
A person, a place, an object, an event, or a concept in the user
environment about which the organization wishes to maintain data.
CSE
Department Computer
Science
of &Engineering CSC 401: database Management System Database Group
Entity Types
CSE
Department Computer
Science
of &Engineering CSC 401: database Management System Database Group
What Should an Entity Be?
SHOULD BE:
An object that will have many instances in the database
An object that will be composed of multiple attributes
An object that we are trying to model
CSE
Department Computer
Science
of &Engineering CSC 401: database Management System Database Group
System user System output
CSE
Department Computer
Science
of &Engineering CSC 401: database Management System Database Group
Naming Entity Type
An entity type name is a singular noun. E.g. CUSTOMER, STUDENT
CLIENT
An entity type name should be concise. REGISTRATION vs STUDENT
Event entity types should be named for the result of the event, not the activity or
CSE
Department Computer
Science
of &Engineering CSC 401: database Management System Database Group
Attributes
A property or characteristic of an entity or relationship
type that is of interest to the organization.
REQUIRED VERSUS OPTIONAL ATTRIBUTES
Required attribute An attribute that must have a value for every
entity (or relationship) instance with which it is associated.
Optional attribute An attribute that may not have a value for every
entity (or relationship) instance with which it is associated.
CSE
Department Computer
Science
of &Engineering CSC 401: database Management System Database Group
Attributes
SIMPLE VERSUS COMPOSITE ATTRIBUTES
Simple (or atomic) attribute An attribute that cannot be broken down into
smaller components that are meaningful to the organization.
Composite attribute An attribute that has meaningful component parts
(attributes).
SINGLE-VALUED VERSUS MULTIVALUED ATTRIBUTES
Multivalued attribute An attribute that may take on more than one value for a
given entity (or relationship) instance.
STORED VERSUS DERIVED ATTRIBUTES
Derived attribute An attribute whose values can be calculated from related
attribute values.
CSE
Department Computer
Science
of &Engineering CSC 401: database Management System Database Group
Attributes
CSE
Department Computer
Science
of &Engineering CSC 401: database Management System Database Group
Identifiers (Keys)
Identifier (Key) - An attribute (or combination of attributes) that
uniquely identifies individual instances of an entity type
Simple Key versus Composite Key
Composite identifier An identifier that consists of a composite
attribute.
Candidate Key – an attribute that could be a key…satisfies the
requirements for being a key
CSE
Department Computer
Science
of &Engineering CSC 401: database Management System Database Group
A composite attribute
An attribute
broken into
component parts
CSE
Department Computer CSC 401: database Management System
Science
of &Engineering Database Group
Simple key attribute
CSE
Department Computer CSC 401: database Management System
Science
of &Engineering Database Group
Composite key attribute
CSE
Department Computer CSC 401: database Management System
Science
of &Engineering Database Group
Entity with a multivalued attribute (Skill) and derived attribute
(Years_Employed)
CSE
Department Computer CSC 401: database Management System
Science
of &Engineering Database Group
Criteria for selecting identifiers
will not change its value over the life of each instance of the
entity type.
Guaranteed to have valid values and not be null (or unknown).
composite identifiers.
CSE
Department Computer
Science
of &Engineering CSC 401: database Management System Database Group
NAMING AND DEFINING ATTRIBUTES
An attribute name is a singular noun or noun phrase (such as
To make an attribute name unique and for clarity purposes, each
qualifiers and classes, as long as those are the names used in the
organization.
CSE
Department Computer
Science
of &Engineering CSC 401: database Management System Database Group
Guidelines for defining attributes
what the attribute is and possibly why it is important
aliases,
CSE
Department Computer
Science
of &Engineering CSC 401: database Management System Database Group
Job of Data Analyst
Identify, collect and understand business rules that govern data.
CSE
Department Computer
Science
of &Engineering CSC 401: database Management System Database Group
Business Rules
Business rules, the foundation of data models, are derived from policies,
procedures, events, functions, and other business objects, and they state
constraints on the organization.
Business rules represent the language and fundamental structure of an
organization.
Business rules formalize the understanding of the organization by organization
CSE
Department Computer
Science
of &Engineering CSC 401: database Management System Database Group
Business Rule: Overview
A statement that defines or constrains some aspect of the business. It is intended to
Enforcement of business rules can be automated through the use of software that can
interpret the rules and enforce them using the integrity mechanisms of the database
management system.
CSE
Department Computer
Science
of &Engineering CSC 401: database Management System Database Group
Good Business Rules:
Declarative – what, not how
Distinct – non-redundant
CSE
Department Computer
Science
of &Engineering CSC 401: database Management System Database Group
Data Name
Relate to business
Be meaningful
Be unique
Be readable
Be repeatable
CSE
Department Computer
Science
of &Engineering CSC 401: database Management System Database Group
Data name development process Salin (1990)
Preparing a definition of the data.
‘AND’ and ‘OR’ in the definition may imply that two or more data
objects are combined, and you may want to separate the objects and
assign different names.
Arranging the words in a meaningful, repeatable way
CSE
Department Computer
Science
of &Engineering CSC 401: database Management System Database Group
DATA DEFINITIONS
A definition is an explanation of a term or a fact.
Term A word or phrase that has a specific meaning for the business.
Fact An association between two or more terms.
Definitions (and all other types of business rules) are gathered from
the same sources as all requirements for information systems.
Definitions will usually be accompanied by diagrams, such as entity-
relationship diagrams.
Definitions will be stated in the singular and explain what the data is, not
what it is not.
A data object should not be added to a data model, such as an entity-
relationship diagram, until after it has been carefully defined (and named)
and there is agreement on this definition.
CSE
Department Computer
Science
of &Engineering CSC 401: database Management System Database Group
Multiple definition accommodation
Use multiple definitions to cover the various situations.
CSE
Department Computer
Science
of &Engineering CSC 401: database Management System Database Group
Business rules
CSE
Department Computer
Science
of &Engineering CSC 401: database Management System Database Group
Thank You
CSE
Department Computer
Science
of &Engineering CSC 401: database Management System Database Group