Data Modeling Techniques (DMTS) : Bubble Chart

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

Data Modeling Techniques (DMTs)

DMTs are graphical representation of data and (also) association between them.
- Bubble Chat
- Data Structure Diagram (DSD)
- Entity Relationship Diagram (ERD)

Bubble Chart
It is a graphical representation of relationship between attributes of An entity class.
For example;
Student
Reg #
Name
Class
NIC #

Reg # Name Class NIC #


DBMS

www.techtilldate.blogspot.com www.bscs15.blogspot.com
Data Structure Diagram (DSD)
In this diagram we represent the entity class along with relationship / association between
them.

Here is the DSD of DBMS.


In this DSD;
- DBMS is Maintained by a DB Administrator
- But a DB Administrator may maintain more than one DBMSs
- DB is Managed by a DBMS
- But a DBMS may Manages many DBs
- DB is Accessed by many Users
- And many users may access the DB
- Users are controlled by a DB Administrator
- But a DB Administrator may control a lot of users

Maintained
DBMS DB Admin

Manages Controlled

Accessed
DB User
DBMS

www.techtilldate.blogspot.com www.bscs15.blogspot.com
Entity Relationship Diagram (ERD)
It is a graphical representation of entity classes, attributes and relationships describing the
association between instances of different entity classes.

Reg # S-Name
C-code C-Title

Student Registers Course


Registers

Works on
Works on Teaches

Project Supervise
Supervises
Teacher
s

T-Name T-ID
P-Name
P-ID

Field

F-Name
F-ID
DBMS

www.techtilldate.blogspot.com www.bscs15.blogspot.com
Cardinalities
Number of instances of an entity class B that can be associated with a single instance of an
entity class A, and vice versa.

A B

- Max cardinality
The maximum number of instances of an entity class B that can be associated with a
single instance of an entity class A, and vice versa.

A B

Max Cardinality

- Min cardinality
The Minimum number of instances of an entity class B that can be associated with a
single instance of an entity class A, and vice versa.

A B

Min Cardinality

- Fixed and Open cardinality

o Fixed Cardinality
If we apply some limit on the cardinalities then it is known as fixed cardinalities.

A 15 B
DBMS

www.techtilldate.blogspot.com www.bscs15.blogspot.com
o Open Cardinality
If the cardinality doesn’t contain a limit then it is said to be an open cardinality.

A B

Types of Cardinalities

Minimum Cardinality
- Optional Cardinality
If the maximum cardinality = 0
o Optional one cardinality
Min =0
Max=1
o Optional many cardinality
Min=0
Max=M

- Mandatory Cardinality
Min=1
o Mandatory one cardinality
Min=1
Max=1
o Mandatory many cardinality
Min=1
Max=M

Types of Relationships
Types of relations describe the association with max cardinalities only.

One-to-one relation (1:1)


DBMS

A B
www.techtilldate.blogspot.com www.bscs15.blogspot.com
One-to-many relation (1: M)

A B

Many-to-many relation (M: N)

A B

Attributes on Relationships
Some time an attribute ‘arises’ when the relationship holds between the related entity classes.

Grade

Student Goes
through
Course
DBMS

www.techtilldate.blogspot.com www.bscs15.blogspot.com
Degree of Relationship
Number of entity classes that participate in a relationship is known as degree of relationship
(no. of rectangles attached to one diamond)
I. Unary Relationship
A relationship in which only one entity class participates in known as unary relationship
(a single rectangle attached to a diamond)
Wrong

Married
Human to Human

Right

Human

Married
to

II. Binary Relation / Degree two relationship


A relationship in which two entity classes participate is known as binary relationship or
degree two relationship.

Register
DBMS

Student Courses
www.techtilldate.blogspot.com www.bscs15.blogspot.com
III. Ternary Relationship / Degree three relationship
A relationship in which three entity classes participate simultaneously is known as
binary relationship or degree two relationship.

Studies
Student Courses

Teacher

Runs
Software Machine

OS
DBMS

www.techtilldate.blogspot.com www.bscs15.blogspot.com
Supplies
Supplier Product

Warehouse

IV. n-ary Relationship


If four or more entity classes participate simultaneously in a relationship then it is
known an n-ary relationship;
Where n=no of entity classes that participate in that relationship.

Extra h/w

Runs
Software Machine

Network info
DBMS

OS
www.techtilldate.blogspot.com www.bscs15.blogspot.com
First Name
Different Types of attributes

Second Name
Color
Name

Last Name
Reg no

City
Student

i. Simple VS Composite attributes


a. Simple Attribute
An attribute that can not be broken down into simpler attributes e.g. color, city.
b. Composite Attribute
An attribute that can be broken into smaller attributes e.g. name can be broken into

ii. Stored VS derived attributes


a. Stored Attributes
An attribute whose value is stored as it is, is known as stored attribute e.g. date of birth,
name, date of joining.
b. Derived Attributes
An attribute whose value is calculated (derived) from some other attributes is known as
derived attribute e.g. experience / seniority, GPA.
For example;
Age=Current year – year of birth.
DBMS

www.techtilldate.blogspot.com www.bscs15.blogspot.com

You might also like