SlideShare a Scribd company logo
1 of 37
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

The Relational Database Model
The Relational Database ModelThe Relational Database Model
The Relational Database ModelShishir Aryal
 
3 - Integrity Constraints.pdf
3 - Integrity Constraints.pdf3 - Integrity Constraints.pdf
3 - Integrity Constraints.pdfgaurav70287
 
Introduction to database
Introduction to databaseIntroduction to database
Introduction to databasePradnya Saval
 
Mapping ER and EER Model
Mapping ER and EER ModelMapping ER and EER Model
Mapping ER and EER ModelMary Brinda
 
Integrity constraints in dbms
Integrity constraints in dbmsIntegrity constraints in dbms
Integrity constraints in dbmsVignesh Saravanan
 
Integrity Constraints
Integrity ConstraintsIntegrity Constraints
Integrity ConstraintsMegha yadav
 
Dbms Notes Lecture 4 : Data Models in DBMS
Dbms Notes Lecture 4 : Data Models in DBMSDbms Notes Lecture 4 : Data Models in DBMS
Dbms Notes Lecture 4 : Data Models in DBMSBIT Durg
 
Normalization
NormalizationNormalization
Normalizationochesing
 
Functional dependancy
Functional dependancyFunctional dependancy
Functional dependancyVisakh V
 
entity-relationship-diagram-chen-&-crow -model.ppt
entity-relationship-diagram-chen-&-crow -model.pptentity-relationship-diagram-chen-&-crow -model.ppt
entity-relationship-diagram-chen-&-crow -model.pptIRWANBINISMAILKPMGur1
 
Chapter 2 Relational Data Model-part1
Chapter 2 Relational Data Model-part1Chapter 2 Relational Data Model-part1
Chapter 2 Relational Data Model-part1Eddyzulham Mahluzydde
 
Relational Algebra & Calculus
Relational Algebra & CalculusRelational Algebra & Calculus
Relational Algebra & CalculusAbdullah Khosa
 
Relational Data Model Introduction
Relational Data Model IntroductionRelational Data Model Introduction
Relational Data Model IntroductionNishant Munjal
 
Chapter 2 Relational Data Model-part 3
Chapter 2 Relational Data Model-part 3Chapter 2 Relational Data Model-part 3
Chapter 2 Relational Data Model-part 3Eddyzulham Mahluzydde
 
Data Models In Database Management System
Data Models In Database Management SystemData Models In Database Management System
Data Models In Database Management SystemAmad Ahmad
 

What's hot (20)

The Relational Database Model
The Relational Database ModelThe Relational Database Model
The Relational Database Model
 
3 - Integrity Constraints.pdf
3 - Integrity Constraints.pdf3 - Integrity Constraints.pdf
3 - Integrity Constraints.pdf
 
Introduction to database
Introduction to databaseIntroduction to database
Introduction to database
 
Conceptual Data Modeling
Conceptual Data ModelingConceptual Data Modeling
Conceptual Data Modeling
 
Mapping ER and EER Model
Mapping ER and EER ModelMapping ER and EER Model
Mapping ER and EER Model
 
Integrity constraints in dbms
Integrity constraints in dbmsIntegrity constraints in dbms
Integrity constraints in dbms
 
E-R diagram & SQL
E-R diagram & SQLE-R diagram & SQL
E-R diagram & SQL
 
Integrity Constraints
Integrity ConstraintsIntegrity Constraints
Integrity Constraints
 
Dbms Notes Lecture 4 : Data Models in DBMS
Dbms Notes Lecture 4 : Data Models in DBMSDbms Notes Lecture 4 : Data Models in DBMS
Dbms Notes Lecture 4 : Data Models in DBMS
 
Normalization
NormalizationNormalization
Normalization
 
Relational model
Relational modelRelational model
Relational model
 
Functional dependancy
Functional dependancyFunctional dependancy
Functional dependancy
 
entity-relationship-diagram-chen-&-crow -model.ppt
entity-relationship-diagram-chen-&-crow -model.pptentity-relationship-diagram-chen-&-crow -model.ppt
entity-relationship-diagram-chen-&-crow -model.ppt
 
Chapter 2 Relational Data Model-part1
Chapter 2 Relational Data Model-part1Chapter 2 Relational Data Model-part1
Chapter 2 Relational Data Model-part1
 
Relational Algebra & Calculus
Relational Algebra & CalculusRelational Algebra & Calculus
Relational Algebra & Calculus
 
DBMS - Normalization
DBMS - NormalizationDBMS - Normalization
DBMS - Normalization
 
Relational Data Model Introduction
Relational Data Model IntroductionRelational Data Model Introduction
Relational Data Model Introduction
 
Chapter 2 Relational Data Model-part 3
Chapter 2 Relational Data Model-part 3Chapter 2 Relational Data Model-part 3
Chapter 2 Relational Data Model-part 3
 
Codds rule
Codds ruleCodds rule
Codds rule
 
Data Models In Database Management System
Data Models In Database Management SystemData Models In Database Management System
Data Models In Database Management System
 

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).pptAshwini Rao
 
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.ppt1520lakshyagupta
 
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.pptwondmhunegn
 
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.pptJoselitoTan2
 
Database DESIGN CONCEPTSDr. Dexter Francis2Data Design
Database DESIGN CONCEPTSDr. Dexter Francis2Data DesignDatabase DESIGN CONCEPTSDr. Dexter Francis2Data Design
Database DESIGN CONCEPTSDr. Dexter Francis2Data DesignOllieShoresna
 
Tableau PPT.ppt
Tableau PPT.pptTableau PPT.ppt
Tableau PPT.ppteMMAY3
 
Data model Assignment.pdf
Data model Assignment.pdfData model Assignment.pdf
Data model Assignment.pdfdeepneuron
 
04 quiz 1 answer key
04 quiz 1 answer key04 quiz 1 answer key
04 quiz 1 answer keyAnne 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.pdfdeepneuron
 
Data model Assignment.pdf
Data model Assignment.pdfData model Assignment.pdf
Data model Assignment.pdfdeepneuron
 
Ado.net session07
Ado.net session07Ado.net session07
Ado.net session07Niit Care
 
relationalDatabaseModel.pptx
relationalDatabaseModel.pptxrelationalDatabaseModel.pptx
relationalDatabaseModel.pptxNirajG3
 

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
 
Advanced sql
Advanced sqlAdvanced sql
Advanced sql
 
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
 
Chapter.07
Chapter.07Chapter.07
Chapter.07
 
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
 
relationalDatabaseModel.pptx
relationalDatabaseModel.pptxrelationalDatabaseModel.pptx
relationalDatabaseModel.pptx
 

More from 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

Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% SecurePooja Nehwal
 
Vip Model Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
Vip Model  Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...Vip Model  Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
Vip Model Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...shivangimorya083
 
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptxBPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptxMohammedJunaid861692
 
Halmar dropshipping via API with DroFx
Halmar  dropshipping  via API with DroFxHalmar  dropshipping  via API with DroFx
Halmar dropshipping via API with DroFxolyaivanovalion
 
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceBDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceDelhi Call girls
 
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...amitlee9823
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysismanisha194592
 
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...SUHANI PANDEY
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
Generative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusGenerative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusTimothy Spann
 
Zuja dropshipping via API with DroFx.pptx
Zuja dropshipping via API with DroFx.pptxZuja dropshipping via API with DroFx.pptx
Zuja dropshipping via API with DroFx.pptxolyaivanovalion
 
Smarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxSmarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxolyaivanovalion
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptxAnupama Kate
 
Ravak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxRavak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxolyaivanovalion
 
Data-Analysis for Chicago Crime Data 2023
Data-Analysis for Chicago Crime Data  2023Data-Analysis for Chicago Crime Data  2023
Data-Analysis for Chicago Crime Data 2023ymrp368
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz1
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfRachmat Ramadhan H
 
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779Best VIP Call Girls Noida Sector 22 Call Me: 8448380779
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779Delhi Call girls
 
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...amitlee9823
 

Recently uploaded (20)

Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
 
Sampling (random) method and Non random.ppt
Sampling (random) method and Non random.pptSampling (random) method and Non random.ppt
Sampling (random) method and Non random.ppt
 
Vip Model Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
Vip Model  Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...Vip Model  Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
Vip Model Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
 
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptxBPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
 
Halmar dropshipping via API with DroFx
Halmar  dropshipping  via API with DroFxHalmar  dropshipping  via API with DroFx
Halmar dropshipping via API with DroFx
 
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceBDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
 
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysis
 
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
Generative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusGenerative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and Milvus
 
Zuja dropshipping via API with DroFx.pptx
Zuja dropshipping via API with DroFx.pptxZuja dropshipping via API with DroFx.pptx
Zuja dropshipping via API with DroFx.pptx
 
Smarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxSmarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptx
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx
 
Ravak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxRavak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptx
 
Data-Analysis for Chicago Crime Data 2023
Data-Analysis for Chicago Crime Data  2023Data-Analysis for Chicago Crime Data  2023
Data-Analysis for Chicago Crime Data 2023
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signals
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
 
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779Best VIP Call Girls Noida Sector 22 Call Me: 8448380779
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779
 
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
 

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