SlideShare a Scribd company logo
Chapter 2
The Relational Database
Model
2
Logical View of Data
Relational Database
Designer focuses on logical representation
rather than physical
Use of table advantageous
Structural and data independence
Related records stored in independent tables
Logical simplicity
Allows for more effective design strategies
3
Logical View of Data (con’t.)
Entities and Attributes
Entity is a person, place, event, or thing about
which data is collected
Attributes are characteristics of the entity
Tables
Holds related entities or entity set
Also called relations
Comprised of rows and columns
4
Table Characteristics
• Two-dimensional structure with rows and
columns
• Rows (tuples) represent single entity
• Columns represent attributes
• Row/column intersection represents single value
• Tables must have an attribute to uniquely
identify each row
Primary key: attribute and a combination of combined
attributes that uniquely identify any given entity (row)
5
Table Characteristics (con’t.)
• Column values all have same data format
Data types:
Number
Character
Date
Logical
• Each column has range of values called
attribute domain
• Order of the rows and columns is
immaterial to the DBMS
6
Row
entity
Column (attribute)Entity set value
7
8
Integrity Rules
Entity integrity
Requirement (Ensures all entities are unique): all
primary key entries are unique; no null value
Each entity has unique key
Referential integrity
Foreign key must match primary key values
Makes it impossible to delete row whose primary key
has mandatory matching foreign key values in
another table
9
Relational Database Operators
Relational algebra defines the theoretical
way of manipulating table contents using
the eight relational operators, or relational
algebra determines table manipulations
Key operators
SELECT
PROJECT
JOIN
10
Relational Database Operators
Other operators
INTERSECT
UNION
DIFFERENCE
PRODUCT
DIVIDE
11
UNION
 Tables must have the same attribute
characters (column and domains must
be identical)
 That is called these tables are UNION
compatible
 Combines all rows
 Example:
12
Union
Figure 2.5
13
Intersect
 Tables must be UNION compatible
 Yield rows appear in both tables
 Example:
14
Yields rows that appear in both tables
Intersect
Figure 2.6
15
Difference
 Tables must be UNION compatible
 Find rows in table that are not
found in the other table.
 Example:
16
Yields rows not found in other tables
Difference
Figure 2.7
17
Product
 Yields all possible pairs of rows
from two tables
 Example:
18
Product
Figure 2.8
19
Select
 Yields values for all rows found in
a table.
 Select can be used to either list all
or list partial rows values that
match a specified criterion.
 Example:
20
Select
21
Project
 Project yields a vertical subset of
a table with selected attributes
 Example:
22
Project
Figure 2.10
23
Join
 Combine information from multiple
tables
 Natural join process
 Product
 Select
 Project
 Example:
24
Join
Figure 2.11
Figure
25
Links tables by selecting rows with
common values in common attribute(s)
Three-stage process
Product creates one table
Select yields appropriate rows
Project yields single copy of each attribute to
eliminate duplicate columns
Natural Join Process
26
Product Process in Join
27
28
Select Process in Join
29
Project Process in Join
30
Other Joins
EquiJOIN
Links tables based on equality condition that
compares specified columns of tables
Does not eliminate duplicate columns
Join criteria must be explicitly defined
31
Other Joins
EquiJOIN that compares specified columns
of each table using operator other than
equality one
Theta JOIN
Any other comparison operator is used, it is
generally called a theta JOIN
32
Other Joins
Outer JOIN
Matched pairs are retained
Unmatched values in other tables left null
Right and left outer JOIN
Example:
33
34
35
Divide
 Use of one single-column table
and one two-column table
 Find the values associate with A
and B Table
 Example:
36
Requires user of single-column table and two-column
table
Divide
Figure 2.17
37
Data Dictionary and System Catalog
Data dictionary
Provides detailed account of all tables found within database
Metadata
Attribute names and characteristics
All members of database design and implementation teams use
the same table, attributes and characteristics
DBMS internally store data dictionary and additional information
containing relationship types, entity and
referential integrity check and enforcement.
Database designer’s database
System catalog
Detailed data dictionary; current relational database software
provides only a system catalog
Data dictionary can be derived from
Stores database characteristics and contents

More Related Content

What's hot

Normalization in a Database
Normalization in a DatabaseNormalization in a Database
Normalization in a Database
Bishrul Haq
 
Databases: Normalisation
Databases: NormalisationDatabases: Normalisation
Databases: Normalisation
Damian T. Gordon
 
Integrity Constraints
Integrity ConstraintsIntegrity Constraints
Integrity Constraints
madhav bansal
 
Data modeling using the entity relationship model
Data modeling using the entity relationship modelData modeling using the entity relationship model
Data modeling using the entity relationship model
Jafar Nesargi
 
Advanced sql
Advanced sqlAdvanced sql
Advanced sql
Dhani Ahmad
 
Relational Database Management System
Relational Database Management SystemRelational Database Management System
Relational Database Management System
Mian Abdul Raheem
 
Unit 4 DBMS.ppt
Unit 4 DBMS.pptUnit 4 DBMS.ppt
Unit 4 DBMS.ppt
HARRSHITHAASCSE
 
Relational database
Relational databaseRelational database
Relational database
SanthiNivas
 
Fundamentals of Database ppt ch02
Fundamentals of Database ppt ch02Fundamentals of Database ppt ch02
Fundamentals of Database ppt ch02
Jotham Gadot
 
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
FUNCTION DEPENDENCY  AND TYPES & EXAMPLEFUNCTION DEPENDENCY  AND TYPES & EXAMPLE
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
Vraj Patel
 
data modeling and models
data modeling and modelsdata modeling and models
data modeling and models
sabah N
 
Relational algebra in dbms
Relational algebra in dbmsRelational algebra in dbms
Relational algebra in dbms
shekhar1991
 
ER-Model-ER Diagram
ER-Model-ER DiagramER-Model-ER Diagram
ER-Model-ER Diagram
Saranya Natarajan
 
DBMS: Types of keys
DBMS:  Types of keysDBMS:  Types of keys
DBMS: Types of keys
Bharati Ugale
 
2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS
koolkampus
 
Chapter-4 Enhanced ER Model
Chapter-4 Enhanced ER ModelChapter-4 Enhanced ER Model
Chapter-4 Enhanced ER Model
Kunal Anand
 
MySQL Data types
MySQL Data typesMySQL Data types
Integrity Constraints
Integrity ConstraintsIntegrity Constraints
Integrity Constraints
Megha yadav
 
Normalization
NormalizationNormalization
Normalization
Salman Memon
 
Normalization in DBMS
Normalization in DBMSNormalization in DBMS
Normalization in DBMS
Prateek Parimal
 

What's hot (20)

Normalization in a Database
Normalization in a DatabaseNormalization in a Database
Normalization in a Database
 
Databases: Normalisation
Databases: NormalisationDatabases: Normalisation
Databases: Normalisation
 
Integrity Constraints
Integrity ConstraintsIntegrity Constraints
Integrity Constraints
 
Data modeling using the entity relationship model
Data modeling using the entity relationship modelData modeling using the entity relationship model
Data modeling using the entity relationship model
 
Advanced sql
Advanced sqlAdvanced sql
Advanced sql
 
Relational Database Management System
Relational Database Management SystemRelational Database Management System
Relational Database Management System
 
Unit 4 DBMS.ppt
Unit 4 DBMS.pptUnit 4 DBMS.ppt
Unit 4 DBMS.ppt
 
Relational database
Relational databaseRelational database
Relational database
 
Fundamentals of Database ppt ch02
Fundamentals of Database ppt ch02Fundamentals of Database ppt ch02
Fundamentals of Database ppt ch02
 
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
FUNCTION DEPENDENCY  AND TYPES & EXAMPLEFUNCTION DEPENDENCY  AND TYPES & EXAMPLE
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
 
data modeling and models
data modeling and modelsdata modeling and models
data modeling and models
 
Relational algebra in dbms
Relational algebra in dbmsRelational algebra in dbms
Relational algebra in dbms
 
ER-Model-ER Diagram
ER-Model-ER DiagramER-Model-ER Diagram
ER-Model-ER Diagram
 
DBMS: Types of keys
DBMS:  Types of keysDBMS:  Types of keys
DBMS: Types of keys
 
2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS
 
Chapter-4 Enhanced ER Model
Chapter-4 Enhanced ER ModelChapter-4 Enhanced ER Model
Chapter-4 Enhanced ER Model
 
MySQL Data types
MySQL Data typesMySQL Data types
MySQL Data types
 
Integrity Constraints
Integrity ConstraintsIntegrity Constraints
Integrity Constraints
 
Normalization
NormalizationNormalization
Normalization
 
Normalization in DBMS
Normalization in DBMSNormalization in DBMS
Normalization in DBMS
 

Similar to The relational database model chapter 2

SQL Server Learning Drive
SQL Server Learning Drive SQL Server Learning Drive
SQL Server Learning Drive
TechandMate
 
Introduction to Structured Query Language (SQL).ppt
Introduction to Structured Query Language (SQL).pptIntroduction to Structured Query Language (SQL).ppt
Introduction to Structured Query Language (SQL).ppt
Ashwini Rao
 
The Relational Database Model 2 univprsty
The Relational Database Model 2 univprstyThe Relational Database Model 2 univprsty
The Relational Database Model 2 univprsty
ErickWasonga2
 
Chapter.07
Chapter.07Chapter.07
Relational databases.pdf
Relational databases.pdfRelational databases.pdf
Relational databases.pdf
chandiruirene
 
MS-Access Tables Forms Queries Reports.ppt
MS-Access Tables Forms Queries Reports.pptMS-Access Tables Forms Queries Reports.ppt
MS-Access Tables Forms Queries Reports.ppt
JoselitoTan2
 
MS-Access Tables Forms Queries Reports.ppt
MS-Access Tables Forms Queries Reports.pptMS-Access Tables Forms Queries Reports.ppt
MS-Access Tables Forms Queries Reports.ppt
1520lakshyagupta
 
MS-Access Tables Forms Queries Reports.ppt
MS-Access Tables Forms Queries Reports.pptMS-Access Tables Forms Queries Reports.ppt
MS-Access Tables Forms Queries Reports.ppt
wondmhunegn
 
Database DESIGN CONCEPTSDr. Dexter Francis2Data Design
Database DESIGN CONCEPTSDr. Dexter Francis2Data DesignDatabase DESIGN CONCEPTSDr. Dexter Francis2Data Design
Database DESIGN CONCEPTSDr. Dexter Francis2Data Design
OllieShoresna
 
Tableau PPT.ppt
Tableau PPT.pptTableau PPT.ppt
Tableau PPT.ppt
eMMAY3
 
CIS145 Final Review
CIS145 Final ReviewCIS145 Final Review
Cis145 Final Review
Cis145 Final ReviewCis145 Final Review
Cis145 Final Review
Cis145 Final ReviewCis145 Final Review
Data model Assignment.pdf
Data model Assignment.pdfData model Assignment.pdf
Data model Assignment.pdf
deepneuron
 
04 quiz 1 answer key
04 quiz 1 answer key04 quiz 1 answer key
04 quiz 1 answer key
Anne Lee
 
Introduction to structured query language (sql) (1)
Introduction to structured query language (sql) (1)Introduction to structured query language (sql) (1)
Introduction to structured query language (sql) (1)
RajniKashyap9
 
Data model Assignment.pdf
Data model Assignment.pdfData model Assignment.pdf
Data model Assignment.pdf
deepneuron
 
Data model Assignment.pdf
Data model Assignment.pdfData model Assignment.pdf
Data model Assignment.pdf
deepneuron
 
Ado.net session07
Ado.net session07Ado.net session07
Ado.net session07
Niit Care
 
Excel 2007 Unit H
Excel 2007 Unit HExcel 2007 Unit H
Excel 2007 Unit H
Raja Waseem Akhtar
 

Similar to The relational database model chapter 2 (20)

SQL Server Learning Drive
SQL Server Learning Drive SQL Server Learning Drive
SQL Server Learning Drive
 
Introduction to Structured Query Language (SQL).ppt
Introduction to Structured Query Language (SQL).pptIntroduction to Structured Query Language (SQL).ppt
Introduction to Structured Query Language (SQL).ppt
 
The Relational Database Model 2 univprsty
The Relational Database Model 2 univprstyThe Relational Database Model 2 univprsty
The Relational Database Model 2 univprsty
 
Chapter.07
Chapter.07Chapter.07
Chapter.07
 
Relational databases.pdf
Relational databases.pdfRelational databases.pdf
Relational databases.pdf
 
MS-Access Tables Forms Queries Reports.ppt
MS-Access Tables Forms Queries Reports.pptMS-Access Tables Forms Queries Reports.ppt
MS-Access Tables Forms Queries Reports.ppt
 
MS-Access Tables Forms Queries Reports.ppt
MS-Access Tables Forms Queries Reports.pptMS-Access Tables Forms Queries Reports.ppt
MS-Access Tables Forms Queries Reports.ppt
 
MS-Access Tables Forms Queries Reports.ppt
MS-Access Tables Forms Queries Reports.pptMS-Access Tables Forms Queries Reports.ppt
MS-Access Tables Forms Queries Reports.ppt
 
Database DESIGN CONCEPTSDr. Dexter Francis2Data Design
Database DESIGN CONCEPTSDr. Dexter Francis2Data DesignDatabase DESIGN CONCEPTSDr. Dexter Francis2Data Design
Database DESIGN CONCEPTSDr. Dexter Francis2Data Design
 
Tableau PPT.ppt
Tableau PPT.pptTableau PPT.ppt
Tableau PPT.ppt
 
CIS145 Final Review
CIS145 Final ReviewCIS145 Final Review
CIS145 Final Review
 
Cis145 Final Review
Cis145 Final ReviewCis145 Final Review
Cis145 Final Review
 
Cis145 Final Review
Cis145 Final ReviewCis145 Final Review
Cis145 Final Review
 
Data model Assignment.pdf
Data model Assignment.pdfData model Assignment.pdf
Data model Assignment.pdf
 
04 quiz 1 answer key
04 quiz 1 answer key04 quiz 1 answer key
04 quiz 1 answer key
 
Introduction to structured query language (sql) (1)
Introduction to structured query language (sql) (1)Introduction to structured query language (sql) (1)
Introduction to structured query language (sql) (1)
 
Data model Assignment.pdf
Data model Assignment.pdfData model Assignment.pdf
Data model Assignment.pdf
 
Data model Assignment.pdf
Data model Assignment.pdfData model Assignment.pdf
Data model Assignment.pdf
 
Ado.net session07
Ado.net session07Ado.net session07
Ado.net session07
 
Excel 2007 Unit H
Excel 2007 Unit HExcel 2007 Unit H
Excel 2007 Unit H
 

More from Nargis Ehsan

Huffman codes
Huffman codesHuffman codes
Huffman codes
Nargis Ehsan
 
Sqlite left outer_joins
Sqlite left outer_joinsSqlite left outer_joins
Sqlite left outer_joins
Nargis Ehsan
 
Sql5
Sql5Sql5
Sql2
Sql2Sql2
Sql statments c ha p# 1
Sql statments c ha p# 1Sql statments c ha p# 1
Sql statments c ha p# 1
Nargis Ehsan
 
Sql 3
Sql 3Sql 3
Quick sort algo analysis
Quick sort algo analysisQuick sort algo analysis
Quick sort algo analysis
Nargis Ehsan
 
Inner join and outer join
Inner join and outer joinInner join and outer join
Inner join and outer join
Nargis Ehsan
 
Erd chapter 3
Erd chapter 3Erd chapter 3
Erd chapter 3
Nargis Ehsan
 
Communication network
Communication networkCommunication network
Communication network
Nargis Ehsan
 
Communication network .ppt
Communication network  .pptCommunication network  .ppt
Communication network .ppt
Nargis Ehsan
 

More from Nargis Ehsan (11)

Huffman codes
Huffman codesHuffman codes
Huffman codes
 
Sqlite left outer_joins
Sqlite left outer_joinsSqlite left outer_joins
Sqlite left outer_joins
 
Sql5
Sql5Sql5
Sql5
 
Sql2
Sql2Sql2
Sql2
 
Sql statments c ha p# 1
Sql statments c ha p# 1Sql statments c ha p# 1
Sql statments c ha p# 1
 
Sql 3
Sql 3Sql 3
Sql 3
 
Quick sort algo analysis
Quick sort algo analysisQuick sort algo analysis
Quick sort algo analysis
 
Inner join and outer join
Inner join and outer joinInner join and outer join
Inner join and outer join
 
Erd chapter 3
Erd chapter 3Erd chapter 3
Erd chapter 3
 
Communication network
Communication networkCommunication network
Communication network
 
Communication network .ppt
Communication network  .pptCommunication network  .ppt
Communication network .ppt
 

Recently uploaded

A presentation that explain the Power BI Licensing
A presentation that explain the Power BI LicensingA presentation that explain the Power BI Licensing
A presentation that explain the Power BI Licensing
AlessioFois2
 
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证如何办理
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证如何办理一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证如何办理
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证如何办理
g4dpvqap0
 
在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样
在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样
在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样
v7oacc3l
 
06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM
06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM
06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM
Timothy Spann
 
End-to-end pipeline agility - Berlin Buzzwords 2024
End-to-end pipeline agility - Berlin Buzzwords 2024End-to-end pipeline agility - Berlin Buzzwords 2024
End-to-end pipeline agility - Berlin Buzzwords 2024
Lars Albertsson
 
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
bopyb
 
The Building Blocks of QuestDB, a Time Series Database
The Building Blocks of QuestDB, a Time Series DatabaseThe Building Blocks of QuestDB, a Time Series Database
The Building Blocks of QuestDB, a Time Series Database
javier ramirez
 
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Aggregage
 
Predictably Improve Your B2B Tech Company's Performance by Leveraging Data
Predictably Improve Your B2B Tech Company's Performance by Leveraging DataPredictably Improve Your B2B Tech Company's Performance by Leveraging Data
Predictably Improve Your B2B Tech Company's Performance by Leveraging Data
Kiwi Creative
 
Experts live - Improving user adoption with AI
Experts live - Improving user adoption with AIExperts live - Improving user adoption with AI
Experts live - Improving user adoption with AI
jitskeb
 
一比一原版(Harvard毕业证书)哈佛大学毕业证如何办理
一比一原版(Harvard毕业证书)哈佛大学毕业证如何办理一比一原版(Harvard毕业证书)哈佛大学毕业证如何办理
一比一原版(Harvard毕业证书)哈佛大学毕业证如何办理
zsjl4mimo
 
一比一原版(牛布毕业证书)牛津布鲁克斯大学毕业证如何办理
一比一原版(牛布毕业证书)牛津布鲁克斯大学毕业证如何办理一比一原版(牛布毕业证书)牛津布鲁克斯大学毕业证如何办理
一比一原版(牛布毕业证书)牛津布鲁克斯大学毕业证如何办理
74nqk8xf
 
My burning issue is homelessness K.C.M.O.
My burning issue is homelessness K.C.M.O.My burning issue is homelessness K.C.M.O.
My burning issue is homelessness K.C.M.O.
rwarrenll
 
Learn SQL from basic queries to Advance queries
Learn SQL from basic queries to Advance queriesLearn SQL from basic queries to Advance queries
Learn SQL from basic queries to Advance queries
manishkhaire30
 
Analysis insight about a Flyball dog competition team's performance
Analysis insight about a Flyball dog competition team's performanceAnalysis insight about a Flyball dog competition team's performance
Analysis insight about a Flyball dog competition team's performance
roli9797
 
Udemy_2024_Global_Learning_Skills_Trends_Report (1).pdf
Udemy_2024_Global_Learning_Skills_Trends_Report (1).pdfUdemy_2024_Global_Learning_Skills_Trends_Report (1).pdf
Udemy_2024_Global_Learning_Skills_Trends_Report (1).pdf
Fernanda Palhano
 
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data LakeViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
Walaa Eldin Moustafa
 
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
nuttdpt
 
The Ipsos - AI - Monitor 2024 Report.pdf
The  Ipsos - AI - Monitor 2024 Report.pdfThe  Ipsos - AI - Monitor 2024 Report.pdf
The Ipsos - AI - Monitor 2024 Report.pdf
Social Samosa
 
State of Artificial intelligence Report 2023
State of Artificial intelligence Report 2023State of Artificial intelligence Report 2023
State of Artificial intelligence Report 2023
kuntobimo2016
 

Recently uploaded (20)

A presentation that explain the Power BI Licensing
A presentation that explain the Power BI LicensingA presentation that explain the Power BI Licensing
A presentation that explain the Power BI Licensing
 
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证如何办理
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证如何办理一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证如何办理
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证如何办理
 
在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样
在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样
在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样
 
06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM
06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM
06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM
 
End-to-end pipeline agility - Berlin Buzzwords 2024
End-to-end pipeline agility - Berlin Buzzwords 2024End-to-end pipeline agility - Berlin Buzzwords 2024
End-to-end pipeline agility - Berlin Buzzwords 2024
 
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
一比一原版(GWU,GW文凭证书)乔治·华盛顿大学毕业证如何办理
 
The Building Blocks of QuestDB, a Time Series Database
The Building Blocks of QuestDB, a Time Series DatabaseThe Building Blocks of QuestDB, a Time Series Database
The Building Blocks of QuestDB, a Time Series Database
 
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
 
Predictably Improve Your B2B Tech Company's Performance by Leveraging Data
Predictably Improve Your B2B Tech Company's Performance by Leveraging DataPredictably Improve Your B2B Tech Company's Performance by Leveraging Data
Predictably Improve Your B2B Tech Company's Performance by Leveraging Data
 
Experts live - Improving user adoption with AI
Experts live - Improving user adoption with AIExperts live - Improving user adoption with AI
Experts live - Improving user adoption with AI
 
一比一原版(Harvard毕业证书)哈佛大学毕业证如何办理
一比一原版(Harvard毕业证书)哈佛大学毕业证如何办理一比一原版(Harvard毕业证书)哈佛大学毕业证如何办理
一比一原版(Harvard毕业证书)哈佛大学毕业证如何办理
 
一比一原版(牛布毕业证书)牛津布鲁克斯大学毕业证如何办理
一比一原版(牛布毕业证书)牛津布鲁克斯大学毕业证如何办理一比一原版(牛布毕业证书)牛津布鲁克斯大学毕业证如何办理
一比一原版(牛布毕业证书)牛津布鲁克斯大学毕业证如何办理
 
My burning issue is homelessness K.C.M.O.
My burning issue is homelessness K.C.M.O.My burning issue is homelessness K.C.M.O.
My burning issue is homelessness K.C.M.O.
 
Learn SQL from basic queries to Advance queries
Learn SQL from basic queries to Advance queriesLearn SQL from basic queries to Advance queries
Learn SQL from basic queries to Advance queries
 
Analysis insight about a Flyball dog competition team's performance
Analysis insight about a Flyball dog competition team's performanceAnalysis insight about a Flyball dog competition team's performance
Analysis insight about a Flyball dog competition team's performance
 
Udemy_2024_Global_Learning_Skills_Trends_Report (1).pdf
Udemy_2024_Global_Learning_Skills_Trends_Report (1).pdfUdemy_2024_Global_Learning_Skills_Trends_Report (1).pdf
Udemy_2024_Global_Learning_Skills_Trends_Report (1).pdf
 
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data LakeViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
 
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
 
The Ipsos - AI - Monitor 2024 Report.pdf
The  Ipsos - AI - Monitor 2024 Report.pdfThe  Ipsos - AI - Monitor 2024 Report.pdf
The Ipsos - AI - Monitor 2024 Report.pdf
 
State of Artificial intelligence Report 2023
State of Artificial intelligence Report 2023State of Artificial intelligence Report 2023
State of Artificial intelligence Report 2023
 

The relational database model chapter 2

  • 1. Chapter 2 The Relational Database Model
  • 2. 2 Logical View of Data Relational Database Designer focuses on logical representation rather than physical Use of table advantageous Structural and data independence Related records stored in independent tables Logical simplicity Allows for more effective design strategies
  • 3. 3 Logical View of Data (con’t.) Entities and Attributes Entity is a person, place, event, or thing about which data is collected Attributes are characteristics of the entity Tables Holds related entities or entity set Also called relations Comprised of rows and columns
  • 4. 4 Table Characteristics • Two-dimensional structure with rows and columns • Rows (tuples) represent single entity • Columns represent attributes • Row/column intersection represents single value • Tables must have an attribute to uniquely identify each row Primary key: attribute and a combination of combined attributes that uniquely identify any given entity (row)
  • 5. 5 Table Characteristics (con’t.) • Column values all have same data format Data types: Number Character Date Logical • Each column has range of values called attribute domain • Order of the rows and columns is immaterial to the DBMS
  • 7. 7
  • 8. 8 Integrity Rules Entity integrity Requirement (Ensures all entities are unique): all primary key entries are unique; no null value Each entity has unique key Referential integrity Foreign key must match primary key values Makes it impossible to delete row whose primary key has mandatory matching foreign key values in another table
  • 9. 9 Relational Database Operators Relational algebra defines the theoretical way of manipulating table contents using the eight relational operators, or relational algebra determines table manipulations Key operators SELECT PROJECT JOIN
  • 10. 10 Relational Database Operators Other operators INTERSECT UNION DIFFERENCE PRODUCT DIVIDE
  • 11. 11 UNION  Tables must have the same attribute characters (column and domains must be identical)  That is called these tables are UNION compatible  Combines all rows  Example:
  • 13. 13 Intersect  Tables must be UNION compatible  Yield rows appear in both tables  Example:
  • 14. 14 Yields rows that appear in both tables Intersect Figure 2.6
  • 15. 15 Difference  Tables must be UNION compatible  Find rows in table that are not found in the other table.  Example:
  • 16. 16 Yields rows not found in other tables Difference Figure 2.7
  • 17. 17 Product  Yields all possible pairs of rows from two tables  Example:
  • 19. 19 Select  Yields values for all rows found in a table.  Select can be used to either list all or list partial rows values that match a specified criterion.  Example:
  • 21. 21 Project  Project yields a vertical subset of a table with selected attributes  Example:
  • 23. 23 Join  Combine information from multiple tables  Natural join process  Product  Select  Project  Example:
  • 25. 25 Links tables by selecting rows with common values in common attribute(s) Three-stage process Product creates one table Select yields appropriate rows Project yields single copy of each attribute to eliminate duplicate columns Natural Join Process
  • 27. 27
  • 30. 30 Other Joins EquiJOIN Links tables based on equality condition that compares specified columns of tables Does not eliminate duplicate columns Join criteria must be explicitly defined
  • 31. 31 Other Joins EquiJOIN that compares specified columns of each table using operator other than equality one Theta JOIN Any other comparison operator is used, it is generally called a theta JOIN
  • 32. 32 Other Joins Outer JOIN Matched pairs are retained Unmatched values in other tables left null Right and left outer JOIN Example:
  • 33. 33
  • 34. 34
  • 35. 35 Divide  Use of one single-column table and one two-column table  Find the values associate with A and B Table  Example:
  • 36. 36 Requires user of single-column table and two-column table Divide Figure 2.17
  • 37. 37 Data Dictionary and System Catalog Data dictionary Provides detailed account of all tables found within database Metadata Attribute names and characteristics All members of database design and implementation teams use the same table, attributes and characteristics DBMS internally store data dictionary and additional information containing relationship types, entity and referential integrity check and enforcement. Database designer’s database System catalog Detailed data dictionary; current relational database software provides only a system catalog Data dictionary can be derived from Stores database characteristics and contents