SlideShare uma empresa Scribd logo
1 de 52
Database Systems:
Design, Implementation, and
Management
Ninth Edition
Chapter 3
The Relational Database Model
Database Systems, 9th Edition 2
Objectives
• In this chapter, students will learn:
– That the relational database model offers a
logical view of data
– About the relational model’s basic component:
relations
– That relations are logical constructs composed
of rows (tuples) and columns (attributes)
– That relations are implemented as tables in a
relational DBMS
Database Systems, 9th Edition 3
Objectives (cont’d.)
– About relational database operators, the data
dictionary, and the system catalog
– How data redundancy is handled in the
relational database model
– Why indexing is important
Database Systems, 9th Edition 4
A Logical View of Data
• Relational model
– View data logically rather than physically
• Table
– Structural and data independence
– Resembles a file conceptually
• Relational database model is easier to
understand than hierarchical and network
models
Database Systems, 9th Edition 5
Tables and Their Characteristics
• Logical view of relational database is based on
relation
– Relation thought of as a table
• Table: two-dimensional structure composed of
rows and columns
– Persistent representation of logical relation
• Contains group of related entities (entity set)
Database Systems, 9th Edition 6
Database Systems, 9th Edition 7
Database Systems, 9th Edition 8
Keys
• Each row in a table must be uniquely
identifiable
• Key is one or more attributes that determine
other attributes
• Key’s role is based on determination
– If you know the value of attribute A, you can
determine the value of attribute B
• Functional dependence
– Attribute B is functionally dependent on A if all
rows in table that agree in value for A also
agree in value for B
Database Systems, 9th Edition 9
Database Systems, 9th Edition 10
Keys (cont’d.)
• Composite key
– Composed of more than one attribute
• Key attribute
– Any attribute that is part of a key
• Superkey
– Any key that uniquely identifies each row
• Candidate key
– A superkey without unnecessary attributes
Database Systems, 9th Edition 11
Keys (cont’d.)
• Nulls
– No data entry
– Not permitted in primary key
– Should be avoided in other attributes
– Can represent:
• An unknown attribute value
• A known, but missing, attribute value
• A “not applicable” condition
Database Systems, 9th Edition 12
Keys (cont’d.)
• Nulls (cont’d.)
– Can create problems when functions such as
COUNT, AVERAGE, and SUM are used
– Can create logical problems when relational tables
are linked
Database Systems, 9th Edition 13
Keys (cont’d.)
• Controlled redundancy
– Makes the relational database work
– Tables within the database share common
attributes
• Enables tables to be linked together
– Multiple occurrences of values not redundant
when required to make the relationship work
– Redundancy exists only when there is
unnecessary duplication of attribute values
Database Systems, 9th Edition 14
Database Systems, 9th Edition 15
Database Systems, 9th Edition 16
Keys (cont’d.)
• Foreign key (FK)
– An attribute whose values match primary key
values in the related table
• Referential integrity
– FK contains a value that refers to an existing
valid tuple (row) in another relation
• Secondary key
– Key used strictly for data retrieval purposes
Database Systems, 9th Edition 17
Database Systems, 9th Edition 18
Integrity Rules
• Many RDBMs enforce integrity rules
automatically
• Safer to ensure that application design
conforms to entity and referential integrity rules
• Designers use flags to avoid nulls
– Flags indicate absence of some value
Database Systems, 9th Edition 19
Database Systems, 9th Edition 20
Database Systems, 9th Edition 21
Relational Set Operators
• Relational algebra
– Defines theoretical way of manipulating table
contents using relational operators
– Use of relational algebra operators on existing
relations produces new relations:
• SELECT • DIFFERENCE
• PROJECT • JOIN
• UNION • PRODUCT
• INTERSECT • DIVIDE
Database Systems, 9th Edition 22
Database Systems, 9th Edition 23
Database Systems, 9th Edition 24
Database Systems, 9th Edition 25
Database Systems, 9th Edition 26
Database Systems, 9th Edition 27
Relational Set Operators (cont’d.)
• Natural Join
– Links tables by selecting rows with common
values in common attribute(s)
• Equijoin
– Links tables on the basis of an equality
condition that compares specified columns
• Theta join
– Any other comparison operator is used
• Outer join
– Matched pairs are retained, and any
unmatched values in other table are left null
Database Systems, 9th Edition 28
Database Systems, 9th Edition 29
Database Systems, 9th Edition 30
Database Systems, 9th Edition 31
Database Systems, 9th Edition 32
The Data Dictionary
and System Catalog
• Data dictionary
– Provides detailed accounting of all tables found
within the user/designer-created database
– Contains (at least) all the attribute names and
characteristics for each table in the system
– Contains metadata: data about data
• System catalog
– Contains metadata
– Detailed system data dictionary that describes all
objects within the database
Database Systems, 9th Edition 33
Database Systems, 9th Edition 34
Relationships within the Relational
Database
• 1:M relationship
– Relational modeling ideal
– Should be the norm in any relational database
design
• 1:1 relationship
– Should be rare in any relational database design
Database Systems, 9th Edition 35
Relationships within the Relational
Database (cont’d.)
• M:N relationships
– Cannot be implemented as such in the relational
model
– M:N relationships can be changed into 1:M
relationships
Database Systems, 9th Edition 36
The 1:M Relationship
• Relational database norm
• Found in any database environment
Database Systems, 9th Edition 37
Database Systems, 9th Edition 38
The 1:1 Relationship
• One entity related to only one other entity, and
vice versa
• Sometimes means that entity components were
not defined properly
• Could indicate that two entities actually belong
in the same table
• Certain conditions absolutely require their use
Database Systems, 9th Edition 39
Database Systems, 9th Edition 40
The M:N Relationship
• Implemented by breaking it up to produce a set
of 1:M relationships
• Avoid problems inherent to M:N relationship by
creating a composite entity
– Includes as foreign keys the primary keys of
tables to be linked
Database Systems, 9th Edition 41
Database Systems, 9th Edition 42
Database Systems, 9th Edition 43
Database Systems, 9th Edition 44
Database Systems, 9th Edition 45
Database Systems, 9th Edition 46
Data Redundancy Revisited
• Data redundancy leads to data anomalies
– Can destroy the effectiveness of the database
• Foreign keys
– Control data redundancies by using common
attributes shared by tables
– Crucial to exercising data redundancy control
• Sometimes, data redundancy is necessary
Database Systems, 9th Edition 47
Database Systems, 9th Edition 48
Indexes
• Orderly arrangement to logically access rows
in a table
• Index key
– Index’s reference point
– Points to data location identified by the key
• Unique index
– Index in which the index key can have only one
pointer value (row) associated with it
• Each index is associated with only one table
Database Systems, 9th Edition 49
Database Systems, 9th Edition 50
Codd’s Relational Database Rules
• In 1985, Codd published a list of 12 rules to
define a relational database system
– Products marketed as “relational” that did not
meet minimum relational standards
• Even dominant database vendors do not fully
support all 12 rules
Database Systems, 9th Edition 51
Summary
• Tables are basic building blocks of a
relational database
• Keys are central to the use of relational tables
• Keys define functional dependencies
– Superkey
– Candidate key
– Primary key
– Secondary key
– Foreign key
Summary (cont’d.)
• Each table row must have a primary key that
uniquely identifies all attributes
• Tables are linked by common attributes
• The relational model supports relational algebra
functions
– SELECT, PROJECT, JOIN, INTERSECT
UNION, DIFFERENCE, PRODUCT, DIVIDE
• Good design begins by identifying entities,
attributes, and relationships
– 1:1, 1:M, M:N
Database Systems, 9th Edition 52

Mais conteúdo relacionado

Mais procurados

The relational database model
The relational database modelThe relational database model
The relational database modelDhani Ahmad
 
Database Design Slide 1
Database Design Slide 1Database Design Slide 1
Database Design Slide 1ahfiki
 
Entity relationship (er) modeling
Entity relationship (er) modelingEntity relationship (er) modeling
Entity relationship (er) modelingDhani Ahmad
 
Fundamentals of Database ppt ch04
Fundamentals of Database ppt ch04Fundamentals of Database ppt ch04
Fundamentals of Database ppt ch04Jotham Gadot
 
Integrity Constraints
Integrity ConstraintsIntegrity Constraints
Integrity ConstraintsMegha yadav
 
Functional dependencies and normalization
Functional dependencies and normalizationFunctional dependencies and normalization
Functional dependencies and normalizationdaxesh chauhan
 
Database Design
Database DesignDatabase Design
Database Designlearnt
 
Fundamentals of Database ppt ch02
Fundamentals of Database ppt ch02Fundamentals of Database ppt ch02
Fundamentals of Database ppt ch02Jotham Gadot
 
database language ppt.pptx
database language ppt.pptxdatabase language ppt.pptx
database language ppt.pptxAnusha sivakumar
 
Advance database systems (part 1)
Advance database systems (part 1)Advance database systems (part 1)
Advance database systems (part 1)Abdullah Khosa
 
Fundamentals of Database system
Fundamentals of Database systemFundamentals of Database system
Fundamentals of Database systemphilipsinter
 
Normalization in a Database
Normalization in a DatabaseNormalization in a Database
Normalization in a DatabaseBishrul Haq
 
Database systems - Chapter 2
Database systems - Chapter 2Database systems - Chapter 2
Database systems - Chapter 2shahab3
 
Rdbms
RdbmsRdbms
Rdbmsrdbms
 
Introduction & history of dbms
Introduction & history of dbmsIntroduction & history of dbms
Introduction & history of dbmssethu pm
 
Database performance tuning and query optimization
Database performance tuning and query optimizationDatabase performance tuning and query optimization
Database performance tuning and query optimizationDhani Ahmad
 

Mais procurados (20)

The relational database model
The relational database modelThe relational database model
The relational database model
 
Database Design Slide 1
Database Design Slide 1Database Design Slide 1
Database Design Slide 1
 
Entity relationship (er) modeling
Entity relationship (er) modelingEntity relationship (er) modeling
Entity relationship (er) modeling
 
Fundamentals of Database ppt ch04
Fundamentals of Database ppt ch04Fundamentals of Database ppt ch04
Fundamentals of Database ppt ch04
 
Integrity Constraints
Integrity ConstraintsIntegrity Constraints
Integrity Constraints
 
Functional dependencies and normalization
Functional dependencies and normalizationFunctional dependencies and normalization
Functional dependencies and normalization
 
Database Design
Database DesignDatabase Design
Database Design
 
Ch09
Ch09Ch09
Ch09
 
Fundamentals of Database ppt ch02
Fundamentals of Database ppt ch02Fundamentals of Database ppt ch02
Fundamentals of Database ppt ch02
 
database language ppt.pptx
database language ppt.pptxdatabase language ppt.pptx
database language ppt.pptx
 
Advance database systems (part 1)
Advance database systems (part 1)Advance database systems (part 1)
Advance database systems (part 1)
 
Databases: Normalisation
Databases: NormalisationDatabases: Normalisation
Databases: Normalisation
 
Unit1 DBMS Introduction
Unit1 DBMS IntroductionUnit1 DBMS Introduction
Unit1 DBMS Introduction
 
Fundamentals of Database system
Fundamentals of Database systemFundamentals of Database system
Fundamentals of Database system
 
Normalization in a Database
Normalization in a DatabaseNormalization in a Database
Normalization in a Database
 
Database systems - Chapter 2
Database systems - Chapter 2Database systems - Chapter 2
Database systems - Chapter 2
 
Rdbms
RdbmsRdbms
Rdbms
 
Introduction & history of dbms
Introduction & history of dbmsIntroduction & history of dbms
Introduction & history of dbms
 
Types of databases
Types of databases   Types of databases
Types of databases
 
Database performance tuning and query optimization
Database performance tuning and query optimizationDatabase performance tuning and query optimization
Database performance tuning and query optimization
 

Destaque

Chapter 1 Fundamentals of Database Management System
Chapter 1 Fundamentals of Database Management SystemChapter 1 Fundamentals of Database Management System
Chapter 1 Fundamentals of Database Management SystemEddyzulham Mahluzydde
 
Database management system presentation
Database management system presentationDatabase management system presentation
Database management system presentationsameerraaj
 
Relational Data Model Introduction
Relational Data Model IntroductionRelational Data Model Introduction
Relational Data Model IntroductionNishant Munjal
 
introduction to database
 introduction to database introduction to database
introduction to databaseAkif shexi
 
Database Systems - Introduction (Chapter 1)
Database Systems - Introduction (Chapter 1)Database Systems - Introduction (Chapter 1)
Database Systems - Introduction (Chapter 1)Vidyasagar Mundroy
 
Cardinality and participation constraints
Cardinality and participation constraintsCardinality and participation constraints
Cardinality and participation constraintsNikhil Deswal
 
Fundamentals of Database Systems Questions and Answers
Fundamentals of Database Systems Questions and AnswersFundamentals of Database Systems Questions and Answers
Fundamentals of Database Systems Questions and AnswersAbdul Rahman Sherzad
 
Logical database design and the relational model(database)
Logical database design and the relational model(database)Logical database design and the relational model(database)
Logical database design and the relational model(database)welcometofacebook
 
Database : Relational Data Model
Database : Relational Data ModelDatabase : Relational Data Model
Database : Relational Data ModelSmriti Jain
 
Database content creation and development
Database content creation and developmentDatabase content creation and development
Database content creation and developmentNAGASHREE C
 

Destaque (13)

Chapter 1 Fundamentals of Database Management System
Chapter 1 Fundamentals of Database Management SystemChapter 1 Fundamentals of Database Management System
Chapter 1 Fundamentals of Database Management System
 
Database management system presentation
Database management system presentationDatabase management system presentation
Database management system presentation
 
Relational Data Model Introduction
Relational Data Model IntroductionRelational Data Model Introduction
Relational Data Model Introduction
 
introduction to database
 introduction to database introduction to database
introduction to database
 
Database Systems - Introduction (Chapter 1)
Database Systems - Introduction (Chapter 1)Database Systems - Introduction (Chapter 1)
Database Systems - Introduction (Chapter 1)
 
Database Systems Concepts, 5th Ed
Database Systems Concepts, 5th EdDatabase Systems Concepts, 5th Ed
Database Systems Concepts, 5th Ed
 
Cardinality and participation constraints
Cardinality and participation constraintsCardinality and participation constraints
Cardinality and participation constraints
 
Fundamentals of Database Systems Questions and Answers
Fundamentals of Database Systems Questions and AnswersFundamentals of Database Systems Questions and Answers
Fundamentals of Database Systems Questions and Answers
 
Logical database design and the relational model(database)
Logical database design and the relational model(database)Logical database design and the relational model(database)
Logical database design and the relational model(database)
 
Database : Relational Data Model
Database : Relational Data ModelDatabase : Relational Data Model
Database : Relational Data Model
 
Data Base Management System
Data Base Management SystemData Base Management System
Data Base Management System
 
Dbms slides
Dbms slidesDbms slides
Dbms slides
 
Database content creation and development
Database content creation and developmentDatabase content creation and development
Database content creation and development
 

Semelhante a Fundamentals of Database ppt ch03

Relational databases.pdf
Relational databases.pdfRelational databases.pdf
Relational databases.pdfchandiruirene
 
02010 ppt ch04
02010 ppt ch0402010 ppt ch04
02010 ppt ch04ams1ams1
 
02010 ppt ch02
02010 ppt ch0202010 ppt ch02
02010 ppt ch02Hpong Js
 
chapter09-120827115409-phpapp01.pdf
chapter09-120827115409-phpapp01.pdfchapter09-120827115409-phpapp01.pdf
chapter09-120827115409-phpapp01.pdfAxmedMaxamuud6
 
Unit I Database concepts - RDBMS & ORACLE
Unit I  Database concepts - RDBMS & ORACLEUnit I  Database concepts - RDBMS & ORACLE
Unit I Database concepts - RDBMS & ORACLEDrkhanchanaR
 
Advanced data modeling
Advanced data modelingAdvanced data modeling
Advanced data modelingDhani Ahmad
 
Chapter – 3 Database Design P-I.pdf
Chapter – 3 Database Design P-I.pdfChapter – 3 Database Design P-I.pdf
Chapter – 3 Database Design P-I.pdfTamiratDejene1
 
Mc leod9e ch06 database management systems
Mc leod9e ch06 database management systemsMc leod9e ch06 database management systems
Mc leod9e ch06 database management systemssellyhood
 
Chapter 9 Data Design .pptxInformation Technology Project Management
Chapter 9 Data Design .pptxInformation Technology Project ManagementChapter 9 Data Design .pptxInformation Technology Project Management
Chapter 9 Data Design .pptxInformation Technology Project ManagementAxmedMaxamuudYoonis
 
Relational Database.pptx
Relational Database.pptxRelational Database.pptx
Relational Database.pptxSubhamSarkar64
 
IS740 Chapter 05
IS740 Chapter 05IS740 Chapter 05
IS740 Chapter 05iDocs
 
database management system
database management systemdatabase management system
database management systemNivetha Ganesan
 
Distributed database
Distributed databaseDistributed database
Distributed databaseNasIr Irshad
 
DBMS & Data Models - In Introduction
DBMS & Data Models - In IntroductionDBMS & Data Models - In Introduction
DBMS & Data Models - In IntroductionRajeev Srivastava
 

Semelhante a Fundamentals of Database ppt ch03 (20)

Relational databases.pdf
Relational databases.pdfRelational databases.pdf
Relational databases.pdf
 
02010 ppt ch04
02010 ppt ch0402010 ppt ch04
02010 ppt ch04
 
02010 ppt ch02
02010 ppt ch0202010 ppt ch02
02010 ppt ch02
 
Advanced sql
Advanced sqlAdvanced sql
Advanced sql
 
chapter09-120827115409-phpapp01.pdf
chapter09-120827115409-phpapp01.pdfchapter09-120827115409-phpapp01.pdf
chapter09-120827115409-phpapp01.pdf
 
Unit I Database concepts - RDBMS & ORACLE
Unit I  Database concepts - RDBMS & ORACLEUnit I  Database concepts - RDBMS & ORACLE
Unit I Database concepts - RDBMS & ORACLE
 
Advanced data modeling
Advanced data modelingAdvanced data modeling
Advanced data modeling
 
Chapter – 3 Database Design P-I.pdf
Chapter – 3 Database Design P-I.pdfChapter – 3 Database Design P-I.pdf
Chapter – 3 Database Design P-I.pdf
 
ITE 101 - Week 7
ITE 101 - Week 7ITE 101 - Week 7
ITE 101 - Week 7
 
Mc leod9e ch06 database management systems
Mc leod9e ch06 database management systemsMc leod9e ch06 database management systems
Mc leod9e ch06 database management systems
 
Chapter 9 Data Design .pptxInformation Technology Project Management
Chapter 9 Data Design .pptxInformation Technology Project ManagementChapter 9 Data Design .pptxInformation Technology Project Management
Chapter 9 Data Design .pptxInformation Technology Project Management
 
Relational Database.pptx
Relational Database.pptxRelational Database.pptx
Relational Database.pptx
 
demo2.ppt
demo2.pptdemo2.ppt
demo2.ppt
 
IS740 Chapter 05
IS740 Chapter 05IS740 Chapter 05
IS740 Chapter 05
 
Chapter 09
Chapter 09Chapter 09
Chapter 09
 
database management system
database management systemdatabase management system
database management system
 
Relational model
Relational modelRelational model
Relational model
 
Distributed database
Distributed databaseDistributed database
Distributed database
 
DBMS & Data Models - In Introduction
DBMS & Data Models - In IntroductionDBMS & Data Models - In Introduction
DBMS & Data Models - In Introduction
 
Joline1.PPT
Joline1.PPTJoline1.PPT
Joline1.PPT
 

Mais de Jotham Gadot

Mais de Jotham Gadot (9)

Research gadot
Research gadotResearch gadot
Research gadot
 
Auto cad manual
Auto cad manualAuto cad manual
Auto cad manual
 
Database using oracle 10g
Database using oracle 10gDatabase using oracle 10g
Database using oracle 10g
 
Case study 2
Case study 2Case study 2
Case study 2
 
Chap01
Chap01Chap01
Chap01
 
C++ beginner's guide ch08
C++ beginner's guide ch08C++ beginner's guide ch08
C++ beginner's guide ch08
 
Chap02
Chap02Chap02
Chap02
 
01 introduction-to-computers
01 introduction-to-computers01 introduction-to-computers
01 introduction-to-computers
 
Opeating system programs
Opeating system programsOpeating system programs
Opeating system programs
 

Último

FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FIDO Alliance
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaCzechDreamin
 
Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Hiroshi SHIBATA
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...CzechDreamin
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?Mark Billinghurst
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Patrick Viafore
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentationyogeshlabana357357
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfFIDO Alliance
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...panagenda
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfFIDO Alliance
 
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandIES VE
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...CzechDreamin
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireExakis Nelite
 
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPTiSEO AI
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfSrushith Repakula
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...FIDO Alliance
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!Memoori
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024Stephen Perrenod
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...FIDO Alliance
 

Último (20)

FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 
Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentation
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & Ireland
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - Questionnaire
 
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 

Fundamentals of Database ppt ch03

  • 1. Database Systems: Design, Implementation, and Management Ninth Edition Chapter 3 The Relational Database Model
  • 2. Database Systems, 9th Edition 2 Objectives • In this chapter, students will learn: – That the relational database model offers a logical view of data – About the relational model’s basic component: relations – That relations are logical constructs composed of rows (tuples) and columns (attributes) – That relations are implemented as tables in a relational DBMS
  • 3. Database Systems, 9th Edition 3 Objectives (cont’d.) – About relational database operators, the data dictionary, and the system catalog – How data redundancy is handled in the relational database model – Why indexing is important
  • 4. Database Systems, 9th Edition 4 A Logical View of Data • Relational model – View data logically rather than physically • Table – Structural and data independence – Resembles a file conceptually • Relational database model is easier to understand than hierarchical and network models
  • 5. Database Systems, 9th Edition 5 Tables and Their Characteristics • Logical view of relational database is based on relation – Relation thought of as a table • Table: two-dimensional structure composed of rows and columns – Persistent representation of logical relation • Contains group of related entities (entity set)
  • 8. Database Systems, 9th Edition 8 Keys • Each row in a table must be uniquely identifiable • Key is one or more attributes that determine other attributes • Key’s role is based on determination – If you know the value of attribute A, you can determine the value of attribute B • Functional dependence – Attribute B is functionally dependent on A if all rows in table that agree in value for A also agree in value for B
  • 10. Database Systems, 9th Edition 10 Keys (cont’d.) • Composite key – Composed of more than one attribute • Key attribute – Any attribute that is part of a key • Superkey – Any key that uniquely identifies each row • Candidate key – A superkey without unnecessary attributes
  • 11. Database Systems, 9th Edition 11 Keys (cont’d.) • Nulls – No data entry – Not permitted in primary key – Should be avoided in other attributes – Can represent: • An unknown attribute value • A known, but missing, attribute value • A “not applicable” condition
  • 12. Database Systems, 9th Edition 12 Keys (cont’d.) • Nulls (cont’d.) – Can create problems when functions such as COUNT, AVERAGE, and SUM are used – Can create logical problems when relational tables are linked
  • 13. Database Systems, 9th Edition 13 Keys (cont’d.) • Controlled redundancy – Makes the relational database work – Tables within the database share common attributes • Enables tables to be linked together – Multiple occurrences of values not redundant when required to make the relationship work – Redundancy exists only when there is unnecessary duplication of attribute values
  • 14. Database Systems, 9th Edition 14
  • 15. Database Systems, 9th Edition 15
  • 16. Database Systems, 9th Edition 16 Keys (cont’d.) • Foreign key (FK) – An attribute whose values match primary key values in the related table • Referential integrity – FK contains a value that refers to an existing valid tuple (row) in another relation • Secondary key – Key used strictly for data retrieval purposes
  • 17. Database Systems, 9th Edition 17
  • 18. Database Systems, 9th Edition 18 Integrity Rules • Many RDBMs enforce integrity rules automatically • Safer to ensure that application design conforms to entity and referential integrity rules • Designers use flags to avoid nulls – Flags indicate absence of some value
  • 19. Database Systems, 9th Edition 19
  • 20. Database Systems, 9th Edition 20
  • 21. Database Systems, 9th Edition 21 Relational Set Operators • Relational algebra – Defines theoretical way of manipulating table contents using relational operators – Use of relational algebra operators on existing relations produces new relations: • SELECT • DIFFERENCE • PROJECT • JOIN • UNION • PRODUCT • INTERSECT • DIVIDE
  • 22. Database Systems, 9th Edition 22
  • 23. Database Systems, 9th Edition 23
  • 24. Database Systems, 9th Edition 24
  • 25. Database Systems, 9th Edition 25
  • 26. Database Systems, 9th Edition 26
  • 27. Database Systems, 9th Edition 27 Relational Set Operators (cont’d.) • Natural Join – Links tables by selecting rows with common values in common attribute(s) • Equijoin – Links tables on the basis of an equality condition that compares specified columns • Theta join – Any other comparison operator is used • Outer join – Matched pairs are retained, and any unmatched values in other table are left null
  • 28. Database Systems, 9th Edition 28
  • 29. Database Systems, 9th Edition 29
  • 30. Database Systems, 9th Edition 30
  • 31. Database Systems, 9th Edition 31
  • 32. Database Systems, 9th Edition 32 The Data Dictionary and System Catalog • Data dictionary – Provides detailed accounting of all tables found within the user/designer-created database – Contains (at least) all the attribute names and characteristics for each table in the system – Contains metadata: data about data • System catalog – Contains metadata – Detailed system data dictionary that describes all objects within the database
  • 33. Database Systems, 9th Edition 33
  • 34. Database Systems, 9th Edition 34 Relationships within the Relational Database • 1:M relationship – Relational modeling ideal – Should be the norm in any relational database design • 1:1 relationship – Should be rare in any relational database design
  • 35. Database Systems, 9th Edition 35 Relationships within the Relational Database (cont’d.) • M:N relationships – Cannot be implemented as such in the relational model – M:N relationships can be changed into 1:M relationships
  • 36. Database Systems, 9th Edition 36 The 1:M Relationship • Relational database norm • Found in any database environment
  • 37. Database Systems, 9th Edition 37
  • 38. Database Systems, 9th Edition 38 The 1:1 Relationship • One entity related to only one other entity, and vice versa • Sometimes means that entity components were not defined properly • Could indicate that two entities actually belong in the same table • Certain conditions absolutely require their use
  • 39. Database Systems, 9th Edition 39
  • 40. Database Systems, 9th Edition 40 The M:N Relationship • Implemented by breaking it up to produce a set of 1:M relationships • Avoid problems inherent to M:N relationship by creating a composite entity – Includes as foreign keys the primary keys of tables to be linked
  • 41. Database Systems, 9th Edition 41
  • 42. Database Systems, 9th Edition 42
  • 43. Database Systems, 9th Edition 43
  • 44. Database Systems, 9th Edition 44
  • 45. Database Systems, 9th Edition 45
  • 46. Database Systems, 9th Edition 46 Data Redundancy Revisited • Data redundancy leads to data anomalies – Can destroy the effectiveness of the database • Foreign keys – Control data redundancies by using common attributes shared by tables – Crucial to exercising data redundancy control • Sometimes, data redundancy is necessary
  • 47. Database Systems, 9th Edition 47
  • 48. Database Systems, 9th Edition 48 Indexes • Orderly arrangement to logically access rows in a table • Index key – Index’s reference point – Points to data location identified by the key • Unique index – Index in which the index key can have only one pointer value (row) associated with it • Each index is associated with only one table
  • 49. Database Systems, 9th Edition 49
  • 50. Database Systems, 9th Edition 50 Codd’s Relational Database Rules • In 1985, Codd published a list of 12 rules to define a relational database system – Products marketed as “relational” that did not meet minimum relational standards • Even dominant database vendors do not fully support all 12 rules
  • 51. Database Systems, 9th Edition 51 Summary • Tables are basic building blocks of a relational database • Keys are central to the use of relational tables • Keys define functional dependencies – Superkey – Candidate key – Primary key – Secondary key – Foreign key
  • 52. Summary (cont’d.) • Each table row must have a primary key that uniquely identifies all attributes • Tables are linked by common attributes • The relational model supports relational algebra functions – SELECT, PROJECT, JOIN, INTERSECT UNION, DIFFERENCE, PRODUCT, DIVIDE • Good design begins by identifying entities, attributes, and relationships – 1:1, 1:M, M:N Database Systems, 9th Edition 52