You are on page 1of 17

Data modeling

1
Journey….
• Define
• Construct
• Manipulate

2
What is a Data Model

• A precise description of the data


content in a system

3
Why data models?

• To aid in the development of a sound


database design that does not allow
anomalies or inconsistencies
• Goal: to create database tables that
do not contain duplicate data values
that can become inconsistent
(redundancy anomalies)

4
Types of data models

• Conceptual: WHAT the system


contains
• Logical: HOW the system will be
implemented, regardless of the DBMS
• Physical: HOW the system will be
implemented using a specific DBMS

5
Types of data models

• Data models
• Process models
• Network models

6
At what level do we use data
models?
• Business level
• Information System level
• Technology level

7
8
Various data models

• Entity Relationship Diagrams(ERD)


• UML (unified modeling language)
• Class models

9
Entity-Relationship Model

• Identify entities
• Identify entity attributes and primary
keys
• Specify relationships

10
Data Entities
• Entity: A "thing" about which you want
to store data in an application
• Multiple examples (instances) of the
entity must exist
• Goal: Store data about each entity in
a separate table
• Do not store duplicate data in multiple
tables or records
• Examples: CUSTOMER, PRODUCT
11
Data Entity Instance

• A specific occurrence (data value) of


an entity
• An entity must have multiple entity
instances or it is not really an entity!
• Example

12
ER Model Attributes

• Attribute Vs Attribute value


• A characteristic (data field) of an
entity that you want to store in the
database
• Attribute value: value of a particular
attribute for a particular entity
instance
• Examples
13
Attribute types

• Simple
• Composite
• Single valued
• Multi-valued
• Derived

14
Data Model Relationships

• Association
• Connection
• Link
• Relationship name – doing word/verb

15
Developing an ER Diagram
• Notation: IDE-FIX
• Symbols :

16
CASE: Uganda Christian University
1. UCU has various campuses
2. Each campus has its administrative
head
3. Different campuses have different
departments
4. These departments have different
programs
5. Which are offered by the students
enrolled
17

You might also like