SlideShare a Scribd company logo
 Chapter 2
 Data Models
ISBN-13: 978-1337627900
ISBN-10: 1337627909
Buy Book Amazon.com URL
Modified by:
Usman Tariq, PhD
Associate Professor, PSAU
Office ☎ 00966 11 588 8386
Learning Objectives
 In this chapter, you will learn:
 About data modeling and why data models are
important
 About the basic data-modeling building blocks
 What business rules are and how they influence
database design
2
Learning Objectives
 In this chapter, you will learn:
 How the major data models evolved
 About emerging alternative data models and the need
they fulfill
 How data models can be classified by their level of
abstraction
3
Data Modeling and Data Models
• Data modeling: It is a process of creating a data model
for the data to be stored in a Database. Whereas data
model is a conceptual representation of
• Data objects
• The associations between different data objects
• The rules.
 Data modeling helps in the visual representation of data
and enforces business rules, regulatory compliances, and
government policies on the data. Data Models ensure
consistency in naming conventions, default values,
semantics, security while ensuring quality of the data.
4
Data Modeling and Data Models
Data model emphasizes on what data is needed and
how it should be organized instead of what operations
need to be performed on the data.
 Data models: Simple representations of complex
real-world data structures
 Useful for supporting a specific problem domain
 Model - Abstraction of a real-world object or event
5
Why use Data Model?
 The primary goal of using data model are:
 Ensures that all data objects required by the database are accurately
represented. Omission of data will lead to creation of faulty reports and
produce incorrect results.
 A data model helps design the database at the conceptual, physical and
logical levels.
 Data Model structure helps to define the relational tables, primary and
foreign keys and stored procedures.
 It provides a clear picture of the base data and can be used by database
developers to create a physical database.
 It is also helpful to identify missing and redundant data.
 Though the initial creation of data model is labor and time consuming,
in the long run, it makes your IT infrastructure upgrade and maintenance
cheaper and faster. 6
Types of Data Models [1/2]
 Conceptual: This Data Model defines WHAT the system
contains. This model is typically created by Business
stakeholders and Data Architects. The purpose is to organize,
scope and define business concepts and rules.
 Logical: Defines HOW the system should be implemented
regardless of the DBMS. This model is typically created by
Data Architects and Business Analysts. The purpose is to
developed technical map of rules and data structures.
 Physical: This Data Model describes HOW the system will be
implemented using a specific DBMS system. This model is
typically created by DBA and developers. The purpose is
actual implementation of the database.
7
Types of Data Models [2/2]
8
Advantages of Data model
 The main goal of a designing data model is to make certain that
data objects offered by the functional team are represented
accurately.
 The data model should be detailed enough to be used for building
the physical database.
 The information in the data model can be used for defining the
relationship between tables, primary and foreign keys, and stored
procedures.
 Data Model helps business to communicate the within and across
organizations.
 Data model helps to documents data mappings in ETL process
 Help to recognize correct sources of data to populate the model
9
Importance of Data Models
Are a communication tool
Give an overall view of the database
Organize data for various users
Are an abstraction for the creation of good
database
10
Disadvantages of Data model
 To develop Data model one should know
physical data stored characteristics.
 This is a navigational system produces
complex application development,
management. Thus, it requires a
knowledge of the biographical truth.
 Even smaller change made in structure
require modification in the entire
application.
 There is no set data manipulation
language in DBMS.
11Space in a Data File
Data Model Basic Building Blocks
 Entity: Unique and distinct object used to collect
and store data
 Attribute: Characteristic of an entity
 Relationship: Describes an association among
entities
 One-to-many (1:M)
 Many-to-many (M:N or M:M)
 One-to-one (1:1)
 Constraint: Set of rules to ensure data integrity
12
Business Rules
Brief, precise, and unambiguous description of a
policy, procedure, or principle
Enable defining the basic building blocks
Describe main and distinguishing characteristics
of the data
13
Business Process Mapping to Application Objects
14
Business Rule Transformation
15
Business Rules are normalized to represent the
desired business level semantics
16
As-is Business Rule Model (Event-driven)
17
Sources of Business Rules
Company
managers
Policy makers
Department
managers
Written
documentation
Direct
interviews
with end users
18
Reasons for Identifying and Documenting
Business Rules
 Help standardize company’s view of data
 Communications tool between users and designers
 Allow designer to:
 Understand the nature, role, scope of data, and business
processes
 Develop appropriate relationship participation rules and
constraints
 Create an accurate data model
19
Translating Business Rules into ‘Data
Model Components’
 Nouns translate into entities
 Verbs translate into relationships among entities
 Relationships are bidirectional
 Questions to identify the relationship type
 How many instances of ‘B’ are related to one instance
of ‘A’?
 How many instances of ‘A’ are related to one instance
of ‘B’?
20
Naming Conventions
 Entity names - Required to:
 Be descriptive of the objects in the business
environment
 Use terminology that is familiar to the users
 Attribute name - Required to be descriptive of the
data represented by the attribute
 Proper naming:
 Facilitates communication between parties
 Promotes self-documentation
21
Database Naming Conventions Best Practices
1. Consistency is always the best policy.
2. Every table should have its own row identifier
3. Plural or singular names don’t really matter
4. Never allow the database to put in the constraint
names automatically
5. Avoid being redundant so you can avoid being
redundant
22
Hierarchical and Network Models
Hierarchical Models Network Models
 Manage large amounts of data
for complex manufacturing
projects
 Represented by an upside-
down tree which contains
segments
 Segments: Equivalent of a file
system’s record type
 Depicts a set of one-to-many
(1:M) relationships
 Represent complex data
relationships
 Improve database performance
and impose a database
standard
 Depicts both one-to-many
(1:M) and many-to-many
(M:N) relationships
23
Hierarchical Model
Advantages Disadvantages
 Promotes data sharing
 Parent/child relationship promotes
conceptual simplicity and data
integrity
 Database security is provided and
enforced by DBMS
 Efficient with 1:M relationships
 Requires knowledge of physical
data storage characteristics
 Navigational system requires
knowledge of hierarchical path
 Changes in structure require
changes in all application
programs
 Implementation limitations
 No data definition
 Lack of standards
24
Network Model
Advantages Disadvantages
 Conceptual simplicity
 Handles more relationship types
 Data access is flexible
 Data owner/member relationship
promotes data integrity
 Conformance to standards
 Includes data definition language
(DDL) and data manipulation
language (DML)
 System complexity limits
efficiency
 Navigational system yields
complex implementation,
application development, and
management
 Structural changes require
changes in all application
programs
25
Standard Database Concepts
26
 Schema
 Conceptual organization of the entire database as
viewed by the database administrator
 To add a new entity attribute in the relational model, you
need to modify the table definition. To add a new attribute
in the key-value store, you add a row to the key-value
store, which is why it is said to be “schema-less.”
 Schema is of three types: Physical schema, logical
schema and view schema.
 The design of a database at physical level is called physical schema. It describes how the data
stored on the disk or the physical storage.
 Design of database at logical level is called logical schema, programmers and database
administrator work at this level. At this level data can be described as certain types of data
records gets stored in data structures.
 Design of database at view level is called view schema. This generally describes end user
interaction with database systems.
Standard Database Concepts
 Subschema
 Portion of the database seen by the application programs that produce
the desired information from the data within the database
 A subschema provides a view of the database as seen by an
application program.
 This view is often a subset of the complete schema definition.
 A subschema is used at run time to provide the DBMS with a
description of those portions of the database that are accessible to the
application program.
 The subschema allows the user to view only that part of the
database that is of interest to him.
 The subschema defines the portion of the database as seen by the
application programs and the application programs can have different
view of data stored in the database. 27
Standard Database Concepts
28
 Data manipulation language (DML)
 Environment in which data can be managed and is used to work with the
data in the database
 SQL includes commands to insert, update, delete, and retrieve data within
the database tables.
 PL/SQL blocks can contain only standard SQL data manipulation language
(DML) commands such as SELECT, INSERT, UPDATE, and DELETE.
The use of data definition language (DDL) commands is not directly
supported in a PL/SQL block.
Standard Database Concepts
 Schema data definition language (DDL)
 Enables the database administrator to define the schema
components
 DDL allows a database administrator to define the
database structure, schema, and subschema.
 Sub-Schema DDL, allows application programs to
define the database components that will be used.
29
Standard Database Concepts
 Schema data definition language
 Data Definition allows the specification of not only a
set of relations but also information about each relation,
including:
 The schema for each relation.
 The domain of values associated with each attribute.
 Integrity constraints
 The set of indices to be maintained for each relations.
 Security and authorization information for each relation.
 The physical storage structure of each relation on disk.
30
Standard Database Concepts
 Schema data definition language (DDL) Commands
 CREATE
 ALTER
 The Oracle ALTER TABLE statement is used to add, modify, or drop/delete columns
in a table. The Oracle ALTER TABLE statement is also used to rename a table.
 DROP
 To remove a relation from an SQL database, we use the drop table command. The drop
table command deletes all information about the dropped relation from the database.
The command
drop table r 31
The Relational Model
 Produced an automatic transmission database that
replaced standard transmission databases
 Based on a relation
 Relation or table: Matrix composed of intersecting
tuple and attribute
 Tuple: Rows
 Attribute: Columns
 Describes a precise set of data manipulation
constructs
32
Relational Model
Advantages Disadvantages
 Structural independence is
promoted using independent
tables
 Tabular view improves
conceptual simplicity
 Ad hoc query capability is based
on SQL
 Isolates the end user from
physical-level details
 Improves implementation and
management simplicity
 Requires substantial hardware and
system software overhead
 Conceptual simplicity gives
untrained people the tools to use a
good system poorly
 May promote information
problems
33
Relational Database Management System(RDBMS)
 Performs basic functions provided by the hierarchical
and network DBMS systems
 Makes the relational data model easier to understand
and implement
 Hides the complexities of the relational model from
the user
34
Figure 2.2 - A Relational Diagram
Cengage Learning © 2015
35
SQL-Based Relational Database
Application
 End-user interface
 Allows end user to interact with the data
 Collection of tables stored in the database
 Each table is independent from another
 Rows in different tables are related based on common
values in common attributes
 SQL engine
 Executes all queries
36
The Entity Relationship Model
 Graphical representation of entities and their
relationships in a database structure
 Entity relationship diagram (ERD)
 Uses graphic representations to model database
components
 Entity instance or entity occurrence
 Rows in the relational table
 Connectivity: Term used to label the relationship
types
37
Entity Relationship Model
Advantages Disadvantages
 Visual modeling yields
conceptual simplicity
 Visual representation makes it
an effective communication
tool
 Is integrated with the dominant
relational model
 Limited constraint
representation
 Limited relationship
representation
 No data manipulation
language
 Loss of information content
occurs when attributes are
removed from entities to avoid
crowded displays
38
Figure 2.3 - The ER Model Notations
39
The Object-Oriented Data Model (OODM)
or Semantic Data Model
 Object-oriented database management system
(OODBMS)
 Based on OODM
 Object: Contains data and their relationships with
operations that are performed on it
 Basic building block for autonomous structures
 Abstraction of real-world entity
 Attributes - Describe the properties of an object
40
The Object-Oriented Data Model (OODM)
 Class: Collection of similar objects with shared
structure and behavior organized in a class hierarchy
 Class hierarchy: Resembles an upside-down tree in
which each class has only one parent
 Inheritance: Object inherits methods and attributes
of parent class
 Unified Modeling Language (UML)
 Describes sets of diagrams and symbols to graphically
model a system
41
Object-Oriented Model
Advantages Disadvantages
 Semantic content is added
 Visual representation includes
semantic content
 Inheritance promotes data
integrity
 Slow development of
standards caused vendors to
supply their own
enhancements
 Compromised widely accepted
standard
 Complex navigational system
 Learning curve is steep
 High system overhead slows
transactions
42
Figure 2.4 - A Comparison of OO, UML,
and ER Models
43
Object/Relational and XML
 Extended relational data model (ERDM)
 Supports OO features and complex data
representation
 Object/Relational Database Management System
(O/R DBMS)
 Based on ERDM, focuses on better data management
 Extensible Markup Language (XML)
 Manages unstructured data for efficient and
effective exchange of all data types
44
Big Data
 Aims to:
 Find new and better ways to manage large amounts of
web and sensor-generated data
 Provide high performance and scalability at a
reasonable cost
 Characteristics
 Volume
 Velocity
 Variety
45
Different formats of ‘big data’
 The three different formats of big data are:
 Structured: Organized data format with a fixed
schema. Ex: RDBMS
 Semi-Structured: Partially organized data which does
not have a fixed format. Ex: XML, JSON
 Unstructured: Unorganized data with an unknown
schema. Ex: Audio, video files etc.
46
Characteristics of Big Data
 Validity: correctness of data
 Variability: dynamic behavior
 Volatility: tendency to change in time
 Vulnerability: vulnerable to breach or attacks
 Visualization: visualizing meaningful usage of data
47
Big Data Challenges
Volume does not allow the usage of
conventional structures
Expensive
OLAP tools proved inconsistent dealing
with unstructured data
48
Big Data New Technologies
Hadoop
Hadoop Distributed
File System (HDFS)
MapReduce NoSQL
49
Big Data Tools
50
Big Data Applications
• Entertainment: Netflix and Amazon use Big Data to make shows and movie
recommendations to their users.
• Insurance: Uses Big data to predict illness, accidents and price their products
accordingly.
• Driver-less Cars: Google’s driver-less cars collect about one gigabyte of data per
second. These experiments require more and more data for their successful execution.
• Education: Opting for big data powered technology as a learning tool instead of
traditional lecture methods, which enhanced the learning of students as well aided the
teacher to track their performance better.
• Automobile: Rolls Royce has embraced Big Data by fitting hundreds of sensors into its
engines and propulsion systems, which record every tiny detail about their operation.
The changes in data in real-time are reported to engineers who will decide the best
course of action such as scheduling maintenance or dispatching engineering teams
should the problem require it.
• Government: A very interesting use of Big Data is in the field of politics to analyze
patterns and influence election results. Cambridge Analytica Ltd. is one such
organization which completely drives on data to change audience behavior and plays
a major role in the electoral process.
51
Big Data Use Cases https://www.oracle.com/big-data/guide/what-is-big-data.html
NoSQL Databases
 Not based on the relational model
 Support distributed database architectures
 Provide high scalability, high availability, and fault
tolerance
 Support large amounts of sparse data
 Geared toward performance rather than transaction
consistency
 Store data in key-value stores
52
53
NoSQL
Advantages Disadvantages
 High scalability, availability, and
fault tolerance are provided
 Uses low-cost commodity
hardware
 Supports Big Data
 4. Key-value model improves
storage efficiency
 In terms of data consistency, it
provides an eventually consistent
model
 Complex programming is
required
 There is no relationship support
 There is no transaction integrity
support
54
NoSQL and Relational Databases Comparison
55
NoSQL databases https://dev.to/lmolivera/everything-you-need-to-know-about-nosql-databases-3o3h
Figure 2.5 - A Simple Key-value Representation
56
Figure 2.6 - The Evolution of Data Models
57
Table 2.3 - Data Model Basic Terminology
Comparison
58
Figure 2.7 - Data Abstraction Levels
59
The External Model
 End users’ view of the data environment
 ER diagrams are used to represent the external views
 External schema: Specific representation of an
external view
60
Figure 2.8 - External Models for Tiny
College
61
The Conceptual Model
 Represents a global view of the entire database by the
entire organization
 Conceptual schema: Basis for the identification and
high-level description of the main data objects
 Has a macro-level view of data environment
 Is software and hardware independent
 Logical design: Task of creating a conceptual data
model
62
Figure 2.9 - Conceptual Model for Tiny College
63
The Internal Model
 Representing database as seen by the DBMS
mapping conceptual model to the DBMS
 Internal schema: Specific representation of an
internal model
 Uses the database constructs supported by the chosen
database
 Is software dependent and hardware independent
 Logical independence: Changing internal model
without affecting the conceptual model
64
Figure 2.10 - Internal Model for Tiny College
65
The Physical Model
 Operates at lowest level of abstraction
 Describes the way data are saved on storage media
such as disks or tapes
 Requires the definition of physical storage and data
access methods
 Relational model aimed at logical level
 Does not require physical-level details
 Physical independence: Changes in physical model
do not affect internal model
66
Table 2.4 - Levels of Data Abstraction
Cengage Learning © 2018
67

More Related Content

PPTX
INTEGRATIVE PROGRAMMING ch1.pptx
StephenStanleyAndres1
 
PPTX
Design and Analysis of Algorithms Lecture Notes
Sreedhar Chowdam
 
PPT
Depth First Search ( DFS )
Sazzad Hossain
 
PPTX
Project management and project life cycle
Institute of Rural Management
 
PDF
Instructor Manual for Principles of Information Security, 7th Edition Module ...
Edwin Calvin
 
PPT
business ethics Ch.2 by ferrell
Hassan Janjua
 
PPTX
Heap sort
Ayesha Tahir
 
PPT
Romney ch05
Sri Rahayu
 
INTEGRATIVE PROGRAMMING ch1.pptx
StephenStanleyAndres1
 
Design and Analysis of Algorithms Lecture Notes
Sreedhar Chowdam
 
Depth First Search ( DFS )
Sazzad Hossain
 
Project management and project life cycle
Institute of Rural Management
 
Instructor Manual for Principles of Information Security, 7th Edition Module ...
Edwin Calvin
 
business ethics Ch.2 by ferrell
Hassan Janjua
 
Heap sort
Ayesha Tahir
 
Romney ch05
Sri Rahayu
 

What's hot (20)

PPT
Data models
Usman Tariq
 
PPTX
Relational Database Design
Archit Saxena
 
PPTX
Data modeling star schema
Sayed Ahmed
 
PPTX
Database : Relational Data Model
Smriti Jain
 
PPTX
Database systems - Chapter 1
shahab3
 
PDF
Sql commands
Prof. Dr. K. Adisesha
 
PDF
Data Models
RituBhargava7
 
PPTX
Relational Database Management System
Mian Abdul Raheem
 
PPT
Uml class-diagram
ASHOK KUMAR PALAKI
 
PPTX
Active database
mridul mishra
 
PPT
The relational database model
Dhani Ahmad
 
PPT
Data dictionary
Surbhi Panhalkar
 
PPTX
Data dictionary
Johnecis Madrid
 
PPTX
Relational model
Dabbal Singh Mahara
 
PPTX
Entity Relationship Diagrams
sadique_ghitm
 
PPTX
Active database system
Adeolu Olaniyan
 
PPT
2. Entity Relationship Model in DBMS
koolkampus
 
PPT
24. Advanced Transaction Processing in DBMS
koolkampus
 
PDF
Data warehouse project on retail store
Siddharth Chaudhary
 
PPTX
Validation based protocol
BBDITM LUCKNOW
 
Data models
Usman Tariq
 
Relational Database Design
Archit Saxena
 
Data modeling star schema
Sayed Ahmed
 
Database : Relational Data Model
Smriti Jain
 
Database systems - Chapter 1
shahab3
 
Sql commands
Prof. Dr. K. Adisesha
 
Data Models
RituBhargava7
 
Relational Database Management System
Mian Abdul Raheem
 
Uml class-diagram
ASHOK KUMAR PALAKI
 
Active database
mridul mishra
 
The relational database model
Dhani Ahmad
 
Data dictionary
Surbhi Panhalkar
 
Data dictionary
Johnecis Madrid
 
Relational model
Dabbal Singh Mahara
 
Entity Relationship Diagrams
sadique_ghitm
 
Active database system
Adeolu Olaniyan
 
2. Entity Relationship Model in DBMS
koolkampus
 
24. Advanced Transaction Processing in DBMS
koolkampus
 
Data warehouse project on retail store
Siddharth Chaudhary
 
Validation based protocol
BBDITM LUCKNOW
 
Ad

Similar to Data Models [DATABASE SYSTEMS: Design, Implementation, and Management] (20)

PDF
Data modeling 101 - Basics - Software Domain
Abdul Ahad
 
PDF
1.1 Data Modelling - Part I (Understand Data Model).pdf
RakeshKumar145431
 
PPTX
1-SDLC - Development Models – Waterfall, Rapid Application Development, Agile...
JOHNLEAK1
 
DOCX
Data Modeling.docx
Michuki Samuel
 
PDF
Introduction-to-Data-Modeling
software development company
 
PDF
Physical Database Requirements.pdf
seifusisay06
 
PPTX
Database Introduction for MIS Students.pptx
deepanjalshrestha1
 
PPTX
Data Modelingwnifffffffffffffffffi3wihffffffffffffffffff
KuyaKim5
 
PDF
Cs8492 Database Management System 20182019 Department Of Csr It
zeweiahlman17
 
PPTX
Lecture 1 to 3intro to normalization in database
maqsoodahmedbscsfkhp
 
PPTX
Mis chapter 7 database systems
Filmon Habtemichael Tesfai
 
PPT
Dbms models
devgocool
 
PDF
LOGICAL data Model - Software Data engineering
Abdul Ahad
 
PDF
Database Systems A Practical Approach to Design Implementation and Management...
zheboazdo
 
PPTX
Database management systems for students
DharaniMani4
 
DOCX
Advanced Database Systems CS352Unit 2 Individual Project.docx
nettletondevon
 
PPT
Dbms unit01
Ila Chandana
 
PPT
Week 2 Characteristics & Benefits of a Database & Types of Data Models
oudesign
 
PDF
Dbms notes
Prof. Dr. K. Adisesha
 
PDF
A relational model of data for large shared data banks
Sammy Alvarez
 
Data modeling 101 - Basics - Software Domain
Abdul Ahad
 
1.1 Data Modelling - Part I (Understand Data Model).pdf
RakeshKumar145431
 
1-SDLC - Development Models – Waterfall, Rapid Application Development, Agile...
JOHNLEAK1
 
Data Modeling.docx
Michuki Samuel
 
Introduction-to-Data-Modeling
software development company
 
Physical Database Requirements.pdf
seifusisay06
 
Database Introduction for MIS Students.pptx
deepanjalshrestha1
 
Data Modelingwnifffffffffffffffffi3wihffffffffffffffffff
KuyaKim5
 
Cs8492 Database Management System 20182019 Department Of Csr It
zeweiahlman17
 
Lecture 1 to 3intro to normalization in database
maqsoodahmedbscsfkhp
 
Mis chapter 7 database systems
Filmon Habtemichael Tesfai
 
Dbms models
devgocool
 
LOGICAL data Model - Software Data engineering
Abdul Ahad
 
Database Systems A Practical Approach to Design Implementation and Management...
zheboazdo
 
Database management systems for students
DharaniMani4
 
Advanced Database Systems CS352Unit 2 Individual Project.docx
nettletondevon
 
Dbms unit01
Ila Chandana
 
Week 2 Characteristics & Benefits of a Database & Types of Data Models
oudesign
 
A relational model of data for large shared data banks
Sammy Alvarez
 
Ad

More from Usman Tariq (18)

PPT
Distributed database management systems
Usman Tariq
 
PPT
Database performance tuning and query optimization
Usman Tariq
 
PPT
Database Systems
Usman Tariq
 
PPTX
Io t in 5g aeon iccais-riyadh
Usman Tariq
 
PPTX
Data science Prospects
Usman Tariq
 
PPT
Database Systems
Usman Tariq
 
PPTX
e-Marketing Research
Usman Tariq
 
PPTX
ERP modules and business software package
Usman Tariq
 
PPTX
ERP Implementation Challenges and Package Selection
Usman Tariq
 
PPTX
Global E-Markets 3.0
Usman Tariq
 
PPTX
ERP Planning and Implementation
Usman Tariq
 
PPTX
Customer Relationship Management (CRM)
Usman Tariq
 
PPTX
The e-Marketing Plan
Usman Tariq
 
PPTX
Strategic E-Marketing and Performance Metrics
Usman Tariq
 
PPTX
What is an erp system?
Usman Tariq
 
PPTX
E-Marketing (past, present, and future)
Usman Tariq
 
PPT
ERP and related technology
Usman Tariq
 
PPTX
An overview - Enterprise
Usman Tariq
 
Distributed database management systems
Usman Tariq
 
Database performance tuning and query optimization
Usman Tariq
 
Database Systems
Usman Tariq
 
Io t in 5g aeon iccais-riyadh
Usman Tariq
 
Data science Prospects
Usman Tariq
 
Database Systems
Usman Tariq
 
e-Marketing Research
Usman Tariq
 
ERP modules and business software package
Usman Tariq
 
ERP Implementation Challenges and Package Selection
Usman Tariq
 
Global E-Markets 3.0
Usman Tariq
 
ERP Planning and Implementation
Usman Tariq
 
Customer Relationship Management (CRM)
Usman Tariq
 
The e-Marketing Plan
Usman Tariq
 
Strategic E-Marketing and Performance Metrics
Usman Tariq
 
What is an erp system?
Usman Tariq
 
E-Marketing (past, present, and future)
Usman Tariq
 
ERP and related technology
Usman Tariq
 
An overview - Enterprise
Usman Tariq
 

Recently uploaded (20)

PDF
This slide provides an overview Technology
mineshkharadi333
 
PDF
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
PPTX
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
PDF
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
PDF
Building High-Performance Oracle Teams: Strategic Staffing for Database Manag...
SMACT Works
 
PDF
Advances in Ultra High Voltage (UHV) Transmission and Distribution Systems.pdf
Nabajyoti Banik
 
PDF
Cloud-Migration-Best-Practices-A-Practical-Guide-to-AWS-Azure-and-Google-Clou...
Artjoker Software Development Company
 
PPTX
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
PDF
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
PDF
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
PDF
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
PDF
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
PDF
CIFDAQ'S Market Insight: BTC to ETH money in motion
CIFDAQ
 
PDF
Chapter 1 Introduction to CV and IP Lecture Note.pdf
Getnet Tigabie Askale -(GM)
 
PPTX
How to Build a Scalable Micro-Investing Platform in 2025 - A Founder’s Guide ...
Third Rock Techkno
 
PPTX
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
PDF
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
PPTX
Smart Infrastructure and Automation through IoT Sensors
Rejig Digital
 
PDF
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
This slide provides an overview Technology
mineshkharadi333
 
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
Building High-Performance Oracle Teams: Strategic Staffing for Database Manag...
SMACT Works
 
Advances in Ultra High Voltage (UHV) Transmission and Distribution Systems.pdf
Nabajyoti Banik
 
Cloud-Migration-Best-Practices-A-Practical-Guide-to-AWS-Azure-and-Google-Clou...
Artjoker Software Development Company
 
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
CIFDAQ'S Market Insight: BTC to ETH money in motion
CIFDAQ
 
Chapter 1 Introduction to CV and IP Lecture Note.pdf
Getnet Tigabie Askale -(GM)
 
How to Build a Scalable Micro-Investing Platform in 2025 - A Founder’s Guide ...
Third Rock Techkno
 
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
Smart Infrastructure and Automation through IoT Sensors
Rejig Digital
 
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 

Data Models [DATABASE SYSTEMS: Design, Implementation, and Management]

  • 1.  Chapter 2  Data Models ISBN-13: 978-1337627900 ISBN-10: 1337627909 Buy Book Amazon.com URL Modified by: Usman Tariq, PhD Associate Professor, PSAU Office ☎ 00966 11 588 8386
  • 2. Learning Objectives  In this chapter, you will learn:  About data modeling and why data models are important  About the basic data-modeling building blocks  What business rules are and how they influence database design 2
  • 3. Learning Objectives  In this chapter, you will learn:  How the major data models evolved  About emerging alternative data models and the need they fulfill  How data models can be classified by their level of abstraction 3
  • 4. Data Modeling and Data Models • Data modeling: It is a process of creating a data model for the data to be stored in a Database. Whereas data model is a conceptual representation of • Data objects • The associations between different data objects • The rules.  Data modeling helps in the visual representation of data and enforces business rules, regulatory compliances, and government policies on the data. Data Models ensure consistency in naming conventions, default values, semantics, security while ensuring quality of the data. 4
  • 5. Data Modeling and Data Models Data model emphasizes on what data is needed and how it should be organized instead of what operations need to be performed on the data.  Data models: Simple representations of complex real-world data structures  Useful for supporting a specific problem domain  Model - Abstraction of a real-world object or event 5
  • 6. Why use Data Model?  The primary goal of using data model are:  Ensures that all data objects required by the database are accurately represented. Omission of data will lead to creation of faulty reports and produce incorrect results.  A data model helps design the database at the conceptual, physical and logical levels.  Data Model structure helps to define the relational tables, primary and foreign keys and stored procedures.  It provides a clear picture of the base data and can be used by database developers to create a physical database.  It is also helpful to identify missing and redundant data.  Though the initial creation of data model is labor and time consuming, in the long run, it makes your IT infrastructure upgrade and maintenance cheaper and faster. 6
  • 7. Types of Data Models [1/2]  Conceptual: This Data Model defines WHAT the system contains. This model is typically created by Business stakeholders and Data Architects. The purpose is to organize, scope and define business concepts and rules.  Logical: Defines HOW the system should be implemented regardless of the DBMS. This model is typically created by Data Architects and Business Analysts. The purpose is to developed technical map of rules and data structures.  Physical: This Data Model describes HOW the system will be implemented using a specific DBMS system. This model is typically created by DBA and developers. The purpose is actual implementation of the database. 7
  • 8. Types of Data Models [2/2] 8
  • 9. Advantages of Data model  The main goal of a designing data model is to make certain that data objects offered by the functional team are represented accurately.  The data model should be detailed enough to be used for building the physical database.  The information in the data model can be used for defining the relationship between tables, primary and foreign keys, and stored procedures.  Data Model helps business to communicate the within and across organizations.  Data model helps to documents data mappings in ETL process  Help to recognize correct sources of data to populate the model 9
  • 10. Importance of Data Models Are a communication tool Give an overall view of the database Organize data for various users Are an abstraction for the creation of good database 10
  • 11. Disadvantages of Data model  To develop Data model one should know physical data stored characteristics.  This is a navigational system produces complex application development, management. Thus, it requires a knowledge of the biographical truth.  Even smaller change made in structure require modification in the entire application.  There is no set data manipulation language in DBMS. 11Space in a Data File
  • 12. Data Model Basic Building Blocks  Entity: Unique and distinct object used to collect and store data  Attribute: Characteristic of an entity  Relationship: Describes an association among entities  One-to-many (1:M)  Many-to-many (M:N or M:M)  One-to-one (1:1)  Constraint: Set of rules to ensure data integrity 12
  • 13. Business Rules Brief, precise, and unambiguous description of a policy, procedure, or principle Enable defining the basic building blocks Describe main and distinguishing characteristics of the data 13
  • 14. Business Process Mapping to Application Objects 14
  • 16. Business Rules are normalized to represent the desired business level semantics 16
  • 17. As-is Business Rule Model (Event-driven) 17
  • 18. Sources of Business Rules Company managers Policy makers Department managers Written documentation Direct interviews with end users 18
  • 19. Reasons for Identifying and Documenting Business Rules  Help standardize company’s view of data  Communications tool between users and designers  Allow designer to:  Understand the nature, role, scope of data, and business processes  Develop appropriate relationship participation rules and constraints  Create an accurate data model 19
  • 20. Translating Business Rules into ‘Data Model Components’  Nouns translate into entities  Verbs translate into relationships among entities  Relationships are bidirectional  Questions to identify the relationship type  How many instances of ‘B’ are related to one instance of ‘A’?  How many instances of ‘A’ are related to one instance of ‘B’? 20
  • 21. Naming Conventions  Entity names - Required to:  Be descriptive of the objects in the business environment  Use terminology that is familiar to the users  Attribute name - Required to be descriptive of the data represented by the attribute  Proper naming:  Facilitates communication between parties  Promotes self-documentation 21
  • 22. Database Naming Conventions Best Practices 1. Consistency is always the best policy. 2. Every table should have its own row identifier 3. Plural or singular names don’t really matter 4. Never allow the database to put in the constraint names automatically 5. Avoid being redundant so you can avoid being redundant 22
  • 23. Hierarchical and Network Models Hierarchical Models Network Models  Manage large amounts of data for complex manufacturing projects  Represented by an upside- down tree which contains segments  Segments: Equivalent of a file system’s record type  Depicts a set of one-to-many (1:M) relationships  Represent complex data relationships  Improve database performance and impose a database standard  Depicts both one-to-many (1:M) and many-to-many (M:N) relationships 23
  • 24. Hierarchical Model Advantages Disadvantages  Promotes data sharing  Parent/child relationship promotes conceptual simplicity and data integrity  Database security is provided and enforced by DBMS  Efficient with 1:M relationships  Requires knowledge of physical data storage characteristics  Navigational system requires knowledge of hierarchical path  Changes in structure require changes in all application programs  Implementation limitations  No data definition  Lack of standards 24
  • 25. Network Model Advantages Disadvantages  Conceptual simplicity  Handles more relationship types  Data access is flexible  Data owner/member relationship promotes data integrity  Conformance to standards  Includes data definition language (DDL) and data manipulation language (DML)  System complexity limits efficiency  Navigational system yields complex implementation, application development, and management  Structural changes require changes in all application programs 25
  • 26. Standard Database Concepts 26  Schema  Conceptual organization of the entire database as viewed by the database administrator  To add a new entity attribute in the relational model, you need to modify the table definition. To add a new attribute in the key-value store, you add a row to the key-value store, which is why it is said to be “schema-less.”  Schema is of three types: Physical schema, logical schema and view schema.  The design of a database at physical level is called physical schema. It describes how the data stored on the disk or the physical storage.  Design of database at logical level is called logical schema, programmers and database administrator work at this level. At this level data can be described as certain types of data records gets stored in data structures.  Design of database at view level is called view schema. This generally describes end user interaction with database systems.
  • 27. Standard Database Concepts  Subschema  Portion of the database seen by the application programs that produce the desired information from the data within the database  A subschema provides a view of the database as seen by an application program.  This view is often a subset of the complete schema definition.  A subschema is used at run time to provide the DBMS with a description of those portions of the database that are accessible to the application program.  The subschema allows the user to view only that part of the database that is of interest to him.  The subschema defines the portion of the database as seen by the application programs and the application programs can have different view of data stored in the database. 27
  • 28. Standard Database Concepts 28  Data manipulation language (DML)  Environment in which data can be managed and is used to work with the data in the database  SQL includes commands to insert, update, delete, and retrieve data within the database tables.  PL/SQL blocks can contain only standard SQL data manipulation language (DML) commands such as SELECT, INSERT, UPDATE, and DELETE. The use of data definition language (DDL) commands is not directly supported in a PL/SQL block.
  • 29. Standard Database Concepts  Schema data definition language (DDL)  Enables the database administrator to define the schema components  DDL allows a database administrator to define the database structure, schema, and subschema.  Sub-Schema DDL, allows application programs to define the database components that will be used. 29
  • 30. Standard Database Concepts  Schema data definition language  Data Definition allows the specification of not only a set of relations but also information about each relation, including:  The schema for each relation.  The domain of values associated with each attribute.  Integrity constraints  The set of indices to be maintained for each relations.  Security and authorization information for each relation.  The physical storage structure of each relation on disk. 30
  • 31. Standard Database Concepts  Schema data definition language (DDL) Commands  CREATE  ALTER  The Oracle ALTER TABLE statement is used to add, modify, or drop/delete columns in a table. The Oracle ALTER TABLE statement is also used to rename a table.  DROP  To remove a relation from an SQL database, we use the drop table command. The drop table command deletes all information about the dropped relation from the database. The command drop table r 31
  • 32. The Relational Model  Produced an automatic transmission database that replaced standard transmission databases  Based on a relation  Relation or table: Matrix composed of intersecting tuple and attribute  Tuple: Rows  Attribute: Columns  Describes a precise set of data manipulation constructs 32
  • 33. Relational Model Advantages Disadvantages  Structural independence is promoted using independent tables  Tabular view improves conceptual simplicity  Ad hoc query capability is based on SQL  Isolates the end user from physical-level details  Improves implementation and management simplicity  Requires substantial hardware and system software overhead  Conceptual simplicity gives untrained people the tools to use a good system poorly  May promote information problems 33
  • 34. Relational Database Management System(RDBMS)  Performs basic functions provided by the hierarchical and network DBMS systems  Makes the relational data model easier to understand and implement  Hides the complexities of the relational model from the user 34
  • 35. Figure 2.2 - A Relational Diagram Cengage Learning © 2015 35
  • 36. SQL-Based Relational Database Application  End-user interface  Allows end user to interact with the data  Collection of tables stored in the database  Each table is independent from another  Rows in different tables are related based on common values in common attributes  SQL engine  Executes all queries 36
  • 37. The Entity Relationship Model  Graphical representation of entities and their relationships in a database structure  Entity relationship diagram (ERD)  Uses graphic representations to model database components  Entity instance or entity occurrence  Rows in the relational table  Connectivity: Term used to label the relationship types 37
  • 38. Entity Relationship Model Advantages Disadvantages  Visual modeling yields conceptual simplicity  Visual representation makes it an effective communication tool  Is integrated with the dominant relational model  Limited constraint representation  Limited relationship representation  No data manipulation language  Loss of information content occurs when attributes are removed from entities to avoid crowded displays 38
  • 39. Figure 2.3 - The ER Model Notations 39
  • 40. The Object-Oriented Data Model (OODM) or Semantic Data Model  Object-oriented database management system (OODBMS)  Based on OODM  Object: Contains data and their relationships with operations that are performed on it  Basic building block for autonomous structures  Abstraction of real-world entity  Attributes - Describe the properties of an object 40
  • 41. The Object-Oriented Data Model (OODM)  Class: Collection of similar objects with shared structure and behavior organized in a class hierarchy  Class hierarchy: Resembles an upside-down tree in which each class has only one parent  Inheritance: Object inherits methods and attributes of parent class  Unified Modeling Language (UML)  Describes sets of diagrams and symbols to graphically model a system 41
  • 42. Object-Oriented Model Advantages Disadvantages  Semantic content is added  Visual representation includes semantic content  Inheritance promotes data integrity  Slow development of standards caused vendors to supply their own enhancements  Compromised widely accepted standard  Complex navigational system  Learning curve is steep  High system overhead slows transactions 42
  • 43. Figure 2.4 - A Comparison of OO, UML, and ER Models 43
  • 44. Object/Relational and XML  Extended relational data model (ERDM)  Supports OO features and complex data representation  Object/Relational Database Management System (O/R DBMS)  Based on ERDM, focuses on better data management  Extensible Markup Language (XML)  Manages unstructured data for efficient and effective exchange of all data types 44
  • 45. Big Data  Aims to:  Find new and better ways to manage large amounts of web and sensor-generated data  Provide high performance and scalability at a reasonable cost  Characteristics  Volume  Velocity  Variety 45
  • 46. Different formats of ‘big data’  The three different formats of big data are:  Structured: Organized data format with a fixed schema. Ex: RDBMS  Semi-Structured: Partially organized data which does not have a fixed format. Ex: XML, JSON  Unstructured: Unorganized data with an unknown schema. Ex: Audio, video files etc. 46
  • 47. Characteristics of Big Data  Validity: correctness of data  Variability: dynamic behavior  Volatility: tendency to change in time  Vulnerability: vulnerable to breach or attacks  Visualization: visualizing meaningful usage of data 47
  • 48. Big Data Challenges Volume does not allow the usage of conventional structures Expensive OLAP tools proved inconsistent dealing with unstructured data 48
  • 49. Big Data New Technologies Hadoop Hadoop Distributed File System (HDFS) MapReduce NoSQL 49
  • 51. Big Data Applications • Entertainment: Netflix and Amazon use Big Data to make shows and movie recommendations to their users. • Insurance: Uses Big data to predict illness, accidents and price their products accordingly. • Driver-less Cars: Google’s driver-less cars collect about one gigabyte of data per second. These experiments require more and more data for their successful execution. • Education: Opting for big data powered technology as a learning tool instead of traditional lecture methods, which enhanced the learning of students as well aided the teacher to track their performance better. • Automobile: Rolls Royce has embraced Big Data by fitting hundreds of sensors into its engines and propulsion systems, which record every tiny detail about their operation. The changes in data in real-time are reported to engineers who will decide the best course of action such as scheduling maintenance or dispatching engineering teams should the problem require it. • Government: A very interesting use of Big Data is in the field of politics to analyze patterns and influence election results. Cambridge Analytica Ltd. is one such organization which completely drives on data to change audience behavior and plays a major role in the electoral process. 51 Big Data Use Cases https://www.oracle.com/big-data/guide/what-is-big-data.html
  • 52. NoSQL Databases  Not based on the relational model  Support distributed database architectures  Provide high scalability, high availability, and fault tolerance  Support large amounts of sparse data  Geared toward performance rather than transaction consistency  Store data in key-value stores 52
  • 53. 53
  • 54. NoSQL Advantages Disadvantages  High scalability, availability, and fault tolerance are provided  Uses low-cost commodity hardware  Supports Big Data  4. Key-value model improves storage efficiency  In terms of data consistency, it provides an eventually consistent model  Complex programming is required  There is no relationship support  There is no transaction integrity support 54
  • 55. NoSQL and Relational Databases Comparison 55 NoSQL databases https://dev.to/lmolivera/everything-you-need-to-know-about-nosql-databases-3o3h
  • 56. Figure 2.5 - A Simple Key-value Representation 56
  • 57. Figure 2.6 - The Evolution of Data Models 57
  • 58. Table 2.3 - Data Model Basic Terminology Comparison 58
  • 59. Figure 2.7 - Data Abstraction Levels 59
  • 60. The External Model  End users’ view of the data environment  ER diagrams are used to represent the external views  External schema: Specific representation of an external view 60
  • 61. Figure 2.8 - External Models for Tiny College 61
  • 62. The Conceptual Model  Represents a global view of the entire database by the entire organization  Conceptual schema: Basis for the identification and high-level description of the main data objects  Has a macro-level view of data environment  Is software and hardware independent  Logical design: Task of creating a conceptual data model 62
  • 63. Figure 2.9 - Conceptual Model for Tiny College 63
  • 64. The Internal Model  Representing database as seen by the DBMS mapping conceptual model to the DBMS  Internal schema: Specific representation of an internal model  Uses the database constructs supported by the chosen database  Is software dependent and hardware independent  Logical independence: Changing internal model without affecting the conceptual model 64
  • 65. Figure 2.10 - Internal Model for Tiny College 65
  • 66. The Physical Model  Operates at lowest level of abstraction  Describes the way data are saved on storage media such as disks or tapes  Requires the definition of physical storage and data access methods  Relational model aimed at logical level  Does not require physical-level details  Physical independence: Changes in physical model do not affect internal model 66
  • 67. Table 2.4 - Levels of Data Abstraction Cengage Learning © 2018 67