Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 19

DATA MODELLING

1
Database Design
 A database designer initially represent high-level database design
that is understood by the users and then translate the requirements
into lower levels of the design
 A high level data model serves the database designer by providing
a conceptual framework in which to specify, in a systematic
fashion, the data requirements of the database users, and a
database structure that fulfills these requirement
 Initial Phase:
 the database designer needs to interact extensively with domain
experts and users to carry out this task
 The outcome of this phase is a specification or user requirements
 Conceptual Design:
 Next, designer, by applying the concepts of the chosen data
model, translates these requirements into conceptual schema of
the database
 The schema developed at the conceptual-design phase provides
a detailed overview of the enterprise
2
Database Design
The process of moving from an abstract data model to the
implementation of the database proceeds in two steps:
 The logical design phase – The designer maps the
high-level conceptual schema onto the
implementation data model of the database system
that will be used.
 The implementation data model is typically the
relational data model, and this step typically
consists of mapping the conceptual schema defined
using the entity-relationship model
 Physical-design phase- Physical features of the
databse are specified. These features include the
form of file organization and the internal storage
structures
3
Data Modeling
Data flow diagram and various processing logical
techniques show how, where, and when data are used or
changed in an information system, but these techniques do
not show the definition, structure, and relationships within
the data.

Data modeling is a technique for organizing and


documenting a system’s data. Data modeling is sometimes
called database modeling because a data model is
eventually implemented as a database. It is sometimes
called information modeling.

4
The Entity Relationship Model
 The entity relationship model (E-R) was developed to
facilitate database design by allowing specification of
an enterprise schema that represents the overall logical
structure of a database
 The E-R model is very useful in mapping the meanings
and interactions of real-world enterprises onto a
conceptual schema
 The E-R model employs three basic notations:
 Entity Set
 Relationship sets and
 Attributes

5
Data Modeling
Developers believe that a data model is the most important
part of the information system requirements because:
 First, the characteristics of data captured during data

modeling are crucial in the design of databases, programs,


computer screens, and printed reports.
 Second, data rather than processes are the most complex

aspects of many modern information systems and hence


require a central role in structuring system requirements.

The goal is to provide a rich data resource that might


support any type of information inquiry, analysis, and
summarization.

6
ERD
Conventions & Guidelines

7
Entity Relationship Diagram (ERD)
 ERD do not depict flow or processing. They should not be
read like data flow diagrams or flowcharts.
 ERD depict data at rest, data being stored. They also do
not imply how data is implemented created, modified,
used or deleted.

There are several notations for data modeling. The actual


model is frequently call an Entity Relationship
Diagram(ERD) because it depicts data in terms of the
entities and relationships described by the data.

8
Concepts of ERD
Entity
An entity is anything, real or abstract, about which we
want to store data. Synonyms include Entity Type
and Entity Class
For any given entity, the real world will contain
multiple occurrences of that entity. Most entities
correspond to persons, objects events or location in
the business environment

Entity
Name

9
Concepts of ERD
Attributes: An attribute is a descriptive property or
characteristics of an entity. Synonyms include element,
property and field e.g.Entity : Student

STUDENT

Na me
.Last Name
.First Name
.Middle Initial
Address
.Street Address
.City
.State or Province
.Country
.Postal Code
Phone Number
.Area Code
.Exchange Number
.Number Within Exchange
Date of Birth
Gender
Race
Major
Grade Poin t Average

10
Concepts of ERD
Compound Attributes: is one that actually consists of more
primitive attributes . Synonyms include Concatenated
attribute, composite attribute, Composite Attribute etc. E.g.
Entity : Name
Attribute - Last name
First Name
Middle Name

Domain : Each attribute of an entity set has a particular


value. The set of possible values that a given attribute can
have is called its domain. Or
The domain of an attribute defines what values an
attribute can legitimately take on

11
Concepts of ERD
A key is an attribute, or a group of attributes, that assumes a
unique value for each entity instance
CANDIDATE KEY is a candidate to become the primary
identifier of instances of an entity.
ALTERNATE KEY : Any candidate key that is not selected to
become the primary key is called an alternate key.
SECONDARY KEY is an attribute or combination of attributes
that may not be a candidate key but that classifies the entity set
on a particular characteristic.

12
Foreign Key is a primary key of one entity that is contributed to
(duplicated in) another entity to identify instances of a relationship

13
Data Modeling Concepts: Relationships
A relationship is a natural business association that
exists between one or more entities. The relationship
may represent an event that links the entities or merely
a logical affinity that exists between the entities.

14
Data Modeling Concepts: Cardinality
Cardinality defines the minimum and maximum
number of occurrences of one entity that may be related
to a single occurrence of the other entity.
Because all relationships are bidirectional, cardinality
must be defined in both directions for every
relationship.

bidirectional

15
ERD Concepts

All Relationships are further described by words or symbols


that indicate the number of occurrences of one entity that can
exist for a single occurrence of the related entity and vice
versa. There are three general possibilities :
One-to-one(1:1) : For one occurrence of the first entity there
can exist only one related occurrence of the second entity and
vice versa
One-to-Many (1:M or M:1) : For one occurrence of one entity
there can exist many related occurrences of a second entity
Many to Many (M:M) : For one occurrence of the first entity,
there can exist many related occurrences of the second entity
and for one occurrence of the second entity there can exist
many occurrences of the first entity

16
Data Modeling Concepts: Degree
The degree of a relationship is the number of entities
that participate in the relationship.

17
Data Modeling Concepts: Degree
A recursive relationship is a relationship that exists
between different instances of the same entity

18
Some more example relationships of different degrees

19

You might also like