Database 1 L3
Database 1 L3
Database 1 L3
Database Principles: Fundamentals of Design, Implementation, and Management, 10 th Edition, Coronel, Morris, & Rob
In this lecture, you will learn:
• What data models are and their importance
• The basic data-modeling building blocks
• Business rules
• Types of data models
• Levels of abstraction
COM304 Databases 2
Data Models
• Data models
– Simple representations/abstractions of complex
real world data structures
– Usually depicted in the form of graphics
– First step in the design of any database
– Main function is to enable understanding of
complexities of the real world environment
– Represents data structures and their
characteristics, relations and constraints
COM304 Databases 3
The Importance of Data Models
• Communication tools
• Facilitate interaction among the designer, the
applications programmer, and the end user
• Improves understanding of the organization
• End-users have different views and needs for data
• Data model organizes data for various users
• Blueprint of the database much like floor plans when
building a house
COM304 Databases 4
Basic Data Modeling Building Blocks
COM304 Databases 5
Business Rules
• Brief, precise, and unambiguous descriptions
of policies, procedures, or principles within a
specific organization
• Apply to any organization that stores and uses
data to generate information
• Description of operations that help to create
and enforce actions within that organization’s
environment
COM304 Databases 6
Sources of Business Rules
• Company managers
• Policy makers
• Department managers
• Written documents
– Procedures
– Standards
– Operations manuals
• Interviews with end users
COM304 Databases 7
Data Model Components from
Business Rules
• Generally, nouns translate into entities
• Verbs translate into relationships among
entities
• Relationships are bi-directional
• Example: “a customer may generate many
invoices” contains 2 nouns (customer and
invoices) and a verb (generate). Therefore,
customer and invoices are entities and
generate is the relationship between them
COM304 Databases 8
Naming Conventions
• All objects(entities) should have a unique
name
• Entity names should be descriptive of the
object and terminologies used should be
familiar to the end users
• It is good practice to prefix attribute name
with the name or abbreviation of its entity
Entity Attribute
CUSTOMER CUS_LAST_NAME
COM304 Databases 9
Types of Data Models
• Hierarchical and network models
• Relational model
• Entity relationship model
• Object oriented model
• Object/relational and XML
• Big data and NoSQL
COM304 Databases 10
The Relational Model
• Implemented through RDBMS
• Table (relations)
– Matrix consisting of a series of row/column
intersections
– Related to each other through sharing a common
entity characteristic
• Relational diagram
– Representation of relational database’s entities,
attributes within those entities, and relationships
between those entities
COM304 Databases 11
The Relational Model
COM304 Databases 12
The Relational Model
COM304 Databases 13
The Entity Relationship Model
• Widely accepted and adapted graphical tool for data modeling
• Introduced by Chen in 1976
• Entity relationship diagram (ERD)
– Uses graphic representations to model database components
– Entity is mapped to a relational table
• Entity instance (or occurrence) is a row in a table
• Entity set is a collection of like entities
• Connectivity labels types of relationships
– Diamond connected to related entities through a relationship
line
COM304 Databases 14
The Entity Relationship Model
COM304 Databases 15
The Entity Relationship Model
COM304 Databases 16
Emerging Data Models
• Big Data
– A movement to find new and better ways to
manage large amounts of Web-generated data
– Deriving useful business information from web
data
– Web data: browsing patterns, customer
preferences, social media data from sources such
as facebook
COM304 Databases 17
Emerging Data Models
• NoSQL
– Not based on the relational data model
– Supports distributed database architecture
– Provides high scalability, high availability, and fault
tolerance
– Supports very large amounts of sparse data
– Geared towards performance rather than transaction
consistency
– Every time you search for a product on amazon, send
message on Facebook or watch a YouTube video, you
are using a NoSQL database
COM304 Databases 18
The Evolution of Data Models
COM304 Databases 19
Data Abstraction Levels
• External model
– End users’ view of the data environment
• Conceptual model
– Represents global view of the entire database
• Internal model
– Representation of the database as “seen” by the DBMS
• Physical model
– Describes the way data are saved on storage media
such as disks or tapes
COM304 Databases 20
Summary
• A data model is a simple representation of a
complex real-world data environment
• Basic data modeling components are:
– Entities
– Attributes
– Relationships
– Constraints
COM304 Databases 21
Summary (continued)
• Types of Data Models
– Hierarchical and network models
– Relational model
– Entity relationship model
– Object oriented model
– Object/relational and XML
– Big data and NoSQL
COM304 Databases 22
Summary (continued)
• Data Abstraction levels
– External model
– Conceptual model
– Internal model
– Physical model
COM304 Databases 23
?
COM304 Databases 24