0% found this document useful (0 votes)
63 views28 pages

Database Modeling Using EER Model

The document discusses database modeling using the entity-relationship (E-R) model. It describes how to develop an E-R diagram through iterative design, user interviews, and validation. E-R diagrams graphically represent entities, attributes, and relationships. The document also explains how to convert an E-R diagram into relational tables and normalize the data through various normal forms. Finally, it briefly introduces object-oriented and physical data models.

Uploaded by

jemu mamed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views28 pages

Database Modeling Using EER Model

The document discusses database modeling using the entity-relationship (E-R) model. It describes how to develop an E-R diagram through iterative design, user interviews, and validation. E-R diagrams graphically represent entities, attributes, and relationships. The document also explains how to convert an E-R diagram into relational tables and normalize the data through various normal forms. Finally, it briefly introduces object-oriented and physical data models.

Uploaded by

jemu mamed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 28

CHAPTER 3

Database modeling using EER model

 Brainstorming questions
1. how we can develop EERD?
2. What are the steps?
3. How can we convert ERD to ER models?
4. What is the standard symbol to represent EER
models?

08/21/2021 Amin T. Lect @ CSIT 1


Developing an ER Diagram
 Designing conceptual model for the database is not
a one linear process but an iterative activity where
the design is refined again and again.
 To identify the entities, attributes, relationships,
and constraints on the data, there are different set of
methods used during the analysis phase.

08/21/2021 Amin T. Lect @ CSIT 2


Cont.…

These include information gathered by…


 Interviewing end users individually and in a group
 Questionnaire survey
 Direct observation
 Examining different documents

08/21/2021 Amin T. Lect @ CSIT 3


Continued
 The basic E-R model is graphically depicted and
presented for review.

 The process is repeated until the end users and


designers agree that the E- R diagram is a fair
representation of the organization’s activities and
functions.

08/21/2021 Amin T. Lect @ CSIT 4


 Checking for Redundant Relationships in the ER
Diagram. Relationships between entities indicate
access from one entity to another - it is therefore
possible to access one entity occurrence from
another entity occurrence even if there are other
entities and relationships that separate them - this is
often referred to as Navigation' of the ER diagram.
 The last phase in ER modeling is validating an ER
Model against requirement of the user.

08/21/2021 Amin T. Lect @ CSIT 5


Graphical Representation in ER Diagramming

08/21/2021 Amin T. Lect @ CSIT 6


08/21/2021 Amin T. Lect @ CSIT 7
08/21/2021 Amin T. Lect @ CSIT 8
Converting ER Diagram to Relational Tables

1. Entity Type Rule


 Each entity type becomes a table. The PK of ET (if
not weak) becomes the PK of the table. The
attributes of the entity type become columns in the
table. This rule should be used first before the
relationship rules.
2. For a relationship with One-to-One Cardinality:
 All the attributes are merged into a single table.
Which means one can post the primary key or
candidate key of one of the relations to the other as a
foreign key.

08/21/2021 Amin T. Lect @ CSIT 9


3. For a relationship with One-to-Many
Cardinality:
 Post the primary key or candidate key from the one
side as a foreign key attribute to the many side. E.g.:
For a relationship called Belongs To between
Employee (Many) and Department (One)
4. For a relationship with Many-to-Many
Cardinality:
 Create a new table (which is the associative entity)
and post primary key or candidate key from each
entity as attributes in the new table along with some
additional attributes (if applicable)

08/21/2021 Amin T. Lect @ CSIT 10


Continued
 After converting the ER diagram in to table forms,
the next phase is implementing the process of
normalization, which is a collection of rules each
table should satisfy.
1. 1NF
2. 2NF
3. 3NF

08/21/2021 Amin T. Lect @ CSIT 11


Logical Database Design
 Logical design is the process of constructing a
model of the information used in an enterprise based
on a specific data but independent of a particular
DBMS and other physical considerations

08/21/2021 Amin T. Lect @ CSIT 12


 Normalization process
A. Collection of Rules to be maintained
B. Discover new entities in the process
C. Revise attributes based on the rules and the discovered
Entities

 The first step before applying the rules in relational data


model is converting the conceptual design to a form
suitable for relational logical model, which is in a form
of tables.

08/21/2021 Amin T. Lect @ CSIT 13


 Object-based Logical Models
 Describe data at the conceptual and view levels.
 Provide fairly flexible structuring capabilities.
 Allow one to specify data constraints explicitly.
 Over 30 such models, including
i. Entity-relationship model.
ii. Object-oriented model.
iii. Binary model.
iv. Semantic data model.

08/21/2021 Amin T. Lect @ CSIT 14


Continued
 At this point, we'll take a closer look at the entity-
relationship (E-R) and object-oriented models.
 Entity Relationship Model (ERM)
 Introduced by Peter Chen in 1976
 Widely accepted and adapted graphical tool for data
modeling

08/21/2021 Amin T. Lect @ CSIT 15


Continued
 The entity-relationship model is based on a
perception of the world as consisting of a collection
of basic objects (entities) and relationships among
these objects.
 Graphical representation of entities and their
relationships in a database structure

08/21/2021 Amin T. Lect @ CSIT 16


The E-R Model
 An entity is a distinguishable object that exists.
 Each entity has associated with it a set of attributes
describing it.
 E.g. number and balance for an account entity.
 A relationship is an association among several
entities.
 E.g. A cust_acct relationship associates a customer
with each account he/she has.

08/21/2021 Amin T. Lect @ CSIT 17


Continued
 The set of all entities or relationships of the same
type is called the entity set or relationship set.
 Another essential element of the E-R diagram is the
mapping cardinalities,

08/21/2021 Amin T. Lect @ CSIT 18


E-R model of real world
 Entities (objects)
 E.g. customers, accounts, bank branch
 Relationships between entities
 E.g. Account A-101 is held by customer Johnson
 Relationship set deposits associates customers with
accounts

08/21/2021 Amin T. Lect @ CSIT 19


Continued
 Widely used for database design
 Produces specification of the data and relationship to
maintain in the database.
 Database design in E-R model usually converted to
design in the relational model, which is used for
storage and processing

08/21/2021 Amin T. Lect @ CSIT 20


The overall logical structure of a database can be
expressed graphically by an E-R diagram:

 RECTANGLES: represent entity sets.


 ELLIPSES: represent attributes.
 DIAMONDS: represent relationships among entity
sets.
 LINES: link attributes to entity sets and entity sets
to relationships

08/21/2021 Amin T. Lect @ CSIT 21


Continued

08/21/2021 Amin T. Lect @ CSIT 22


Continued

08/21/2021 Amin T. Lect @ CSIT 23


The Object-Oriented Model
 Like the E-R model, the object-oriented model is
based on a collection of objects.
 An object contains values stored in instance
variables within the object.
 Unlike the record-oriented models, these values are
themselves objects.

08/21/2021 Amin T. Lect @ CSIT 24


Continued
 An object also contains bodies of code (methods)
that operate on the object.
 Objects that contain the same types of values and the
same methods are grouped into classes. A class may
be viewed as a type definition for objects.
 Two objects containing the same values are distinct.

08/21/2021 Amin T. Lect @ CSIT 25


Object-oriented data model (OODM)
 Basis of object-oriented database management system
(OODBMS)
1. Object – abstraction of a real-world entity
2. Attributes – properties of an object
3. Class - objects that share similar characteristics &
behaviour.
 Classes are organized in a class hierarchy
4. Inheritance – an object within the class hierarchy
inherits the attributes and methods of a class

08/21/2021 Amin T. Lect @ CSIT 26


Physical Data Models
 Are used to describe data at the lowest level.
 Very few models, e.g.
a. Unifying model.
b. Frame memory.

08/21/2021 Amin T. Lect @ CSIT 27


Summary

08/21/2021 Amin T. Lect @ CSIT 28

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy