0% found this document useful (0 votes)
7 views

Chapter 2

Data Modelling And Normalization

Uploaded by

Anosha Khan
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Chapter 2

Data Modelling And Normalization

Uploaded by

Anosha Khan
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 20

Data Modeling and Normalization CHAPTER

2
This chapter introduces the concepts of Data Modeling and Normalization.
Data Modeling

What is Data Modeling ?


• Data modeling is the process of analyzing the things of interest to your organization and
how these things are related to each other.
• The data modeling process results in the discovery and documentation of the data
resources of your business.
• Before implementing databases of any sort, a DBA or DA needs to develop a sound
model of the data to be stored.
Data Modeling

• Before implementing databases of any sort, a DBA or DA needs to develop a sound model of the
data to be stored.
• Novice database developers frequently begin with the quick-and-dirty approach to database
implementation. They approach database design from a programming perspective.
• Because novices often lack experience with databases and data requirements gathering, they
attempt to design databases like the flat files they are accustomed to using.
• This is a major mistake. Indeed, most developers using this approach quickly discover problems
after the databases and applications become operational in a production environment.
• At a minimum, performance will suffer and data may not be as readily available as required. At
worst, data integrity problems may arise, rendering the entire application unusable.
Requirement of Data Modeling

• What is required is a practiced and formal approach to gathering data requirements and
modeling the data, that is, the discovery and identification of entities and data elements.
• Data normalization is a big part of data modeling and database design.
• A normalized data model reduces data redundancy and inconsistencies by ensuring that the
data elements are designed appropriately.
Data Modeling Concepts

• The first objective of data modeling is to understand the requirements.


• A data model delivers value by enhancing communication and understanding
• It can be argued that these are quite valuable. However, the primary value of a data model is its
ability to be used as a blueprint to build a physical database.
• When databases are built from a well-designed data model, the resultant structures provide
increased value to the organization.
Data Modeling Advantages

• Minimized data redundancy


• Maximized data integrity
• Increased stability
• Better data sharing
• Increased consistency
• More access to data
• Better data usability.
The Enterprise Data Model

What is Enterprise Data Model ?


• An enterprise data model is a single data model that describes comprehensively the data needs of
the entire organization.

Data modeling requires a different mindset than requirements gathering for application
development and process-oriented tasks. It is important to think "what" is of interest instead of
"how" tasks are accomplished. To transition to this alternative way of thinking, follow these three
rules.
The Enterprise Data Model(THREE
RULES)

• Don't think physical; think conceptual .


Concern yourself with business issues and terms rather than physical storage issues and DBMS
constraints.
• Don't think process; think structure.
How something is done, although important for application development, is not important for data
modeling. The things that processes are being applied to are what is important to data modeling.
• Don't think navigation; think relationship.
The way that things are related to one another is important because relationships map the data model.
The way in which relationships are traversed is unimportant to conceptual and logical data modeling.
The Enterprise Data Model

Keep in mind
As you create your data models, you are developing the
lexicon of your organization's business. Much like a
dictionary functions as the lexicon of a given language, the
data model functions as the lexicon of business terms and
their usage.
Data Modeling

Data Objects
A Data Object is a representation of a composite information that must be understood and processed by the system.
(Example: “Width” cannot be Data Object but “Dimension” can be)
• An Entity (i.e Person)
• A thing (i.e Report)
• An occurrence (i.e Telephone call)
• Event (i.e Alarm)
• A role (i.e Sales person)
• A place (i.e Warehouse)
• A structure (i.e File)
Data Modeling

Attributes
An attribute is a characteristic of an entity. Every attribute does one of three things:
• Identifies. An attribute that identifies is a candidate key. If the value of an identifying attribute
changes, it should identify a different entity occurrence.
• Relates. An attribute that relates entities is a foreign key. The attribute refers to the primary key
attribute of an occurrence of another (or the same) entity.
• Describes. An attribute is descriptive if it depicts or express a characteristic of an entity
occurrence, but does not identify or relate.

Every attribute does one of three things: it identifies, relates, or describes


Data Modeling (Keys)

What are Keys ?


Keys consist of the attributes that identify entity occurrences and define the
relationships between entities. There are 3 types of Keys:

• A candidate key is an attribute, or set of attributes, that can be used to uniquely identify an
occurrence of the entity.
• The primary key is chosen from the set of candidate keys and is used to identify an entity
occurrence.
The primary key must guarantee the uniqueness of an entity occurrence.
1. The value of any component of the primary key cannot be null.

2. Primary keys of basic entities should not have embedded meaning.

3. Primary keys should not be changeable.


Data Modeling (Keys)

•Foreign keys reside in dependent entities


to establish relationships. The primary
key identifies an entity occurrence;
foreign keys identify relationships
between entity occurrences.
Data Modeling (Relationships)

Relationships define how the different entities are associated with each
other. A relationship name should describe the role played by an entity
in its association with another (or perhaps the same) entity. The keys
define a relationship: the primary key in the parent entity and the
foreign key in the dependent entity.
Data Modeling (Relationships)
Optionality
The data model must also capture whether relationships are mandatory or optional. This is
commonly referred to as the optionality of the relationship.
Example: This data model fragment clearly states that an EMPLOYEE is employed by a STORE.
The STORE can have zero, one, or multiple EMPLOYEEs. If an EMPLOYEE exists, a
relationship to a STORE is mandatory. Furthermore, an EMPLOYEE can only work for one store.
Entity-Relationship Diagramming

• An E/R diagram graphically depicts the entities and relationships of a data model.
• Data models are typically rendered in a graphical format using an entity-relationship
diagram, or E/R diagram for short. An E/R diagram graphically depicts the entities and
relationships of a data model.
Entity-Relationship Diagramming
Methods
E/R diagramming methods: (1) Ross, (2) Bachmann, (3) Martin, (4) Chen, (5) Rumbaugh
ER - SAMPLE

• An E/R diagram will show the entities in


boxes and use lines or arrows to show
relationships. The format of the boxes and
lines differs with the diagramming method.

This diagram is made using ERwin


TO BE
CONTINUE

You might also like