CSE303 Lecture03-04 ERD01 2023
CSE303 Lecture03-04 ERD01 2023
CSE Science
t of &Engineering
Lecture 03-04
CSE 303: Database Management
System
Importance of Data Model
● The characteristics of data captured during data modeling
are crucial in the design of databases, programs, and other
system components. The facts and rules captured during
the process of data modeling are essential in assuring data
integrity in an information system.
● Data rather than processes are the most complex aspect of
many modern information systems and hence require a
central role in structuring system requirements.
● Data tend to be more stable than the business processes
that use that data.
THE E-R MODEL
● Entity-relationship model (E-R model)
● Derived attribute An
attribute whose values can be calculated
from related attribute values.
Attributes
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
Composite attribute
An attribute
broken into
component parts
Simple key attribute
Composite key attribute
Multivalued and derived attribute
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).
● Avoid the use of so-called intelligent identifiers (or
keys), whose structure indicates classifications,
locations, and so on. (e.g. containing locations or
people that might change)
● Substitute single-attribute surrogate identifiers for
large composite identifiers.
NAMING AND DEFINING ATTRIBUTES
● An attribute name is a singular noun or noun phrase (such as
Customer ID, Age, Product Minimum Price, or Major).
● An attribute name should be unique.
● To make an attribute name unique and for clarity
purposes, each attribute name should follow a standard format.
● Similar attributes of different entity types should use the same
qualifiers and classes, as long as those are the names used in
the organization.
Guidelines for defining attributes
● what the attribute is and possibly why it is important
● aliases,
govern data.
● Represent those rules so that they can be
software that can interpret the rules and enforce them using the
integrity mechanisms of the database management system.
Good Business Rules:
● Declarative – what, not how
● Distinct – non-redundant
people
Data Name
● Relate to business
● Be meaningful
● Be unique
● Be readable
list
● Be repeatable
situations.
● Use a very general definition that will cover most
situations.
● Consider using multiple, related, data objects for
definition.
Business rules
Thank You