SlideShare a Scribd company logo
1 of 52
Database Systems: Design,
Implementation, and
Management
Eighth Edition
Chapter 3
The Relational Database Model
Database Systems, 8th
Edition 2
Objectives
• In this chapter, you 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, 8th
Edition 3
Objectives (continued)
• In this chapter, you will learn: (continued)
– 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, 8th
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 easier to
understand than hierarchical and network
models
Database Systems, 8th
Edition 5
Tables and Their Characteristics
• Logical view of relational database 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 = an entity
set
Database Systems, 8th
Edition 6
Attribute domain : range attribute. (attribute yang dihad-limitasikan)
contoh: field nama hanya boleh di isi dgn 30 huruf sahaja.
Setiap table perlu ada satu identifier yang membezakan sesuatu
Database Systems, 8th
Edition 7
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 functionally dependent on A if all
rows in table that agree in value for A also
agree in value for B
ada banyak kunci selain PRIMARY KEY dan juga FOREIGN KEY
peranan kunci adalah untuk “menentukan” apa.
Rekod yang tak boleh menentukan attribute yang lain adalah rekod
yang “functional independence”
Sepatutnya setiap rekod akan menentukan attribute yang lain.
FUNTIONAL DEPENDENCE
merupakan rekod yang
menentukan attribute yang
lain. Attribute yang lain
bergantung kepada rekod
tersebut.
Sekiranya attribute yang lain
tidak bergantung kepada
rekod tertentu, ianya
merupakan FUNTIONAL
INDEPENDENCE
Database Systems, 8th
Edition 9
Database Systems, 8th
Edition 10
Keys (continued)
• 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
kunci yang menggabungkan 2 kunci atau lebih
setiap attribute yang digabungkan menjadi kunci adalah key attribute
the only one or more key yang menentukan attribute yang lain.
Sepatutnya setiap rekod akan menentukan attribute yang lain.
Sepatutnya setiap rekod akan menentukan attribute yang lain.
Database Systems, 8th
Edition 11
Keys (continued)
• 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, 8th
Edition 12
Keys (continued)
• Nulls:
– Can create problems when functions such as
COUNT, AVERAGE, and SUM are used
– Can create logical problems when relational tables
are linked
Database Systems, 8th
Edition 13
Keys (continued)
• 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
mengawal pertindihan data
Database Systems, 8th
Edition 14
Database Systems, 8th
Edition 15
Database Systems, 8th
Edition 16
Keys (continued)
• 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
tujuan secondary key adalah untuk searching
Database Systems, 8th
Edition 17
dalam candidate key tidak boleh ada superkey
Foreign key tak apa kalau ada null value. Tapi primary key tak boleh
ada null value
Database Systems, 8th
Edition 18
Database Systems, 8th
Edition 19
Database Systems, 8th
Edition 20
Integrity Rules
• Many RDBMs enforce integrity rules
automatically
• Safer to ensure application design conforms to
entity and referential integrity rules
• Designers use flags to avoid nulls
– Flags indicate absence of some value
Database Systems, 8th
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
• UNION INTERSECT
• DIFFERENCE PRODUCT
• SELECT PROJECT JOIN DIVIDE
Database Systems, 8th
Edition 22
Database Systems, 8th
Edition 23
Database Systems, 8th
Edition 24
Database Systems, 8th
Edition 25
Database Systems, 8th
Edition 26
Database Systems, 8th
Edition 27
Database Systems, 8th
Edition 28
Relational Set Operators (continued)
• 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 retained and any unmatched
values in other table left null
Database Systems, 8th
Edition 29
Database Systems, 8th
Edition 30
Database Systems, 8th
Edition 31
Database Systems, 8th
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, 8th
Edition 33
Database Systems, 8th
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, 8th
Edition 35
Relationships within the Relational
Database (continued)
• M:N relationships
– Cannot be implemented as such in the relational
model
– M:N relationships can be changed into two 1:M
relationships
Database Systems, 8th
Edition 36
The 1:M Relationship
• Relational database norm
• Found in any database environment
Database Systems, 8th
Edition 37
Database Systems, 8th
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, 8th
Edition 39
Database Systems, 8th
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, 8th
Edition 41
Database Systems, 8th
Edition 42
Database Systems, 8th
Edition 43
Database Systems, 8th
Edition 44
Database Systems, 8th
Edition 45
Database Systems, 8th
Edition 46
Data Redundancy Revisited
• Data redundancy leads to data anomalies
– Such 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, 8th
Edition 47
Database Systems, 8th
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, 8th
Edition 49
Database Systems, 8th
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, 8th
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
Database Systems, 8th
Edition 52
Summary (continued)
• Each table row must have a primary key that
uniquely identifies all attributes
• Tables 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

More Related Content

What's hot

Database : Relational Data Model
Database : Relational Data ModelDatabase : Relational Data Model
Database : Relational Data ModelSmriti Jain
 
Lecture 01 introduction to database
Lecture 01 introduction to databaseLecture 01 introduction to database
Lecture 01 introduction to databaseemailharmeet
 
Database fundamentals(database)
Database fundamentals(database)Database fundamentals(database)
Database fundamentals(database)welcometofacebook
 
Relational Database Design
Relational Database DesignRelational Database Design
Relational Database DesignArchit Saxena
 
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
 
Types of Database Models
Types of Database ModelsTypes of Database Models
Types of Database ModelsMurassa Gillani
 
data modeling and models
data modeling and modelsdata modeling and models
data modeling and modelssabah N
 
Database systems
Database systemsDatabase systems
Database systemsDhani Ahmad
 
Entity Relationship Diagrams
Entity Relationship DiagramsEntity Relationship Diagrams
Entity Relationship Diagramssadique_ghitm
 
Database Design
Database DesignDatabase Design
Database Designlearnt
 
Database Normalization
Database NormalizationDatabase Normalization
Database NormalizationArun Sharma
 
Fundamentals of Database ppt ch04
Fundamentals of Database ppt ch04Fundamentals of Database ppt ch04
Fundamentals of Database ppt ch04Jotham Gadot
 
All data models in dbms
All data models in dbmsAll data models in dbms
All data models in dbmsNaresh Kumar
 

What's hot (20)

Database : Relational Data Model
Database : Relational Data ModelDatabase : Relational Data Model
Database : Relational Data Model
 
Lecture 01 introduction to database
Lecture 01 introduction to databaseLecture 01 introduction to database
Lecture 01 introduction to database
 
Database fundamentals(database)
Database fundamentals(database)Database fundamentals(database)
Database fundamentals(database)
 
Relational Database Design
Relational Database DesignRelational Database Design
Relational Database Design
 
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
 
Relational model
Relational modelRelational model
Relational model
 
Types of Database Models
Types of Database ModelsTypes of Database Models
Types of Database Models
 
11 Database Concepts
11 Database Concepts11 Database Concepts
11 Database Concepts
 
data modeling and models
data modeling and modelsdata modeling and models
data modeling and models
 
Database systems
Database systemsDatabase systems
Database systems
 
Entity Relationship Diagrams
Entity Relationship DiagramsEntity Relationship Diagrams
Entity Relationship Diagrams
 
Database Design
Database DesignDatabase Design
Database Design
 
Data Models
Data ModelsData Models
Data Models
 
Data models
Data modelsData models
Data models
 
Database Normalization
Database NormalizationDatabase Normalization
Database Normalization
 
Fundamentals of Database ppt ch04
Fundamentals of Database ppt ch04Fundamentals of Database ppt ch04
Fundamentals of Database ppt ch04
 
All data models in dbms
All data models in dbmsAll data models in dbms
All data models in dbms
 
ER Model in DBMS
ER Model in DBMSER Model in DBMS
ER Model in DBMS
 
Dbms Useful PPT
Dbms Useful PPTDbms Useful PPT
Dbms Useful PPT
 
Advanced sql
Advanced sqlAdvanced sql
Advanced sql
 

Viewers also liked

Introduction to project management
Introduction to project managementIntroduction to project management
Introduction to project managementDhani Ahmad
 
Database Management Systems 1
Database Management Systems 1Database Management Systems 1
Database Management Systems 1Nickkisha Farrell
 
Project integration management
Project integration managementProject integration management
Project integration managementDhani Ahmad
 
Business intelligence and data warehouses
Business intelligence and data warehousesBusiness intelligence and data warehouses
Business intelligence and data warehousesDhani Ahmad
 
Database Model
Database ModelDatabase Model
Database Modellaurel828
 
Database administration and security
Database administration and securityDatabase administration and security
Database administration and securityDhani Ahmad
 
Database connectivity and web technologies
Database connectivity and web technologiesDatabase connectivity and web technologies
Database connectivity and web technologiesDhani Ahmad
 
Distributed database management systems
Distributed database management systemsDistributed database management systems
Distributed database management systemsDhani Ahmad
 
Relational database management system
Relational database management systemRelational database management system
Relational database management systemMuhammad Bilal Tariq
 
Strategic planning
Strategic planningStrategic planning
Strategic planningDhani Ahmad
 
Types of islamic institutions and records
Types of islamic institutions and recordsTypes of islamic institutions and records
Types of islamic institutions and recordsDhani Ahmad
 
Project management IT Project Management
Project management IT Project Management Project management IT Project Management
Project management IT Project Management Amanda Haddad
 
Chap01 introduction to project management
Chap01 introduction to project managementChap01 introduction to project management
Chap01 introduction to project managementDhani Ahmad
 
Database design, implementation, and management -chapter04
Database design, implementation, and management -chapter04Database design, implementation, and management -chapter04
Database design, implementation, and management -chapter04Beni Krisbiantoro
 
Information system
Information systemInformation system
Information systemDhani Ahmad
 
Database design, implementation, and management -chapter02
Database design, implementation, and management -chapter02Database design, implementation, and management -chapter02
Database design, implementation, and management -chapter02Beni Krisbiantoro
 
Chap03 the project management process groups
Chap03 the project management process groupsChap03 the project management process groups
Chap03 the project management process groupsDhani Ahmad
 

Viewers also liked (20)

Introduction to project management
Introduction to project managementIntroduction to project management
Introduction to project management
 
Database Management Systems 1
Database Management Systems 1Database Management Systems 1
Database Management Systems 1
 
Project integration management
Project integration managementProject integration management
Project integration management
 
Business intelligence and data warehouses
Business intelligence and data warehousesBusiness intelligence and data warehouses
Business intelligence and data warehouses
 
Database Model
Database ModelDatabase Model
Database Model
 
Database administration and security
Database administration and securityDatabase administration and security
Database administration and security
 
Database connectivity and web technologies
Database connectivity and web technologiesDatabase connectivity and web technologies
Database connectivity and web technologies
 
Distributed database management systems
Distributed database management systemsDistributed database management systems
Distributed database management systems
 
Relational database management system
Relational database management systemRelational database management system
Relational database management system
 
Database
DatabaseDatabase
Database
 
Strategic planning
Strategic planningStrategic planning
Strategic planning
 
Types of islamic institutions and records
Types of islamic institutions and recordsTypes of islamic institutions and records
Types of islamic institutions and records
 
Project management IT Project Management
Project management IT Project Management Project management IT Project Management
Project management IT Project Management
 
Chap01 introduction to project management
Chap01 introduction to project managementChap01 introduction to project management
Chap01 introduction to project management
 
Database design, implementation, and management -chapter04
Database design, implementation, and management -chapter04Database design, implementation, and management -chapter04
Database design, implementation, and management -chapter04
 
Information system
Information systemInformation system
Information system
 
Database design, implementation, and management -chapter02
Database design, implementation, and management -chapter02Database design, implementation, and management -chapter02
Database design, implementation, and management -chapter02
 
Chap03 the project management process groups
Chap03 the project management process groupsChap03 the project management process groups
Chap03 the project management process groups
 
Dfd examples
Dfd examplesDfd examples
Dfd examples
 
Lecture2 oracle ppt
Lecture2 oracle pptLecture2 oracle ppt
Lecture2 oracle ppt
 

Similar to The relational database model

Relational databases.pdf
Relational databases.pdfRelational databases.pdf
Relational databases.pdfchandiruirene
 
02010 ppt ch04
02010 ppt ch0402010 ppt ch04
02010 ppt ch04ams1ams1
 
Unit I Database concepts - RDBMS & ORACLE
Unit I  Database concepts - RDBMS & ORACLEUnit I  Database concepts - RDBMS & ORACLE
Unit I Database concepts - RDBMS & ORACLEDrkhanchanaR
 
Relational Database.pptx
Relational Database.pptxRelational Database.pptx
Relational Database.pptxSubhamSarkar64
 
02010 ppt ch02
02010 ppt ch0202010 ppt ch02
02010 ppt ch02Hpong Js
 
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
 
Fundamentals of Database ppt ch02
Fundamentals of Database ppt ch02Fundamentals of Database ppt ch02
Fundamentals of Database ppt ch02Jotham Gadot
 
chapter09-120827115409-phpapp01.pdf
chapter09-120827115409-phpapp01.pdfchapter09-120827115409-phpapp01.pdf
chapter09-120827115409-phpapp01.pdfAxmedMaxamuud6
 
Chapter-5 The Relational Data Model
Chapter-5 The Relational Data ModelChapter-5 The Relational Data Model
Chapter-5 The Relational Data ModelKunal Anand
 
ch2-slide Data Models.pptx
ch2-slide Data Models.pptxch2-slide Data Models.pptx
ch2-slide Data Models.pptxTamiratDejene1
 
relationalDatabaseModel.pptx
relationalDatabaseModel.pptxrelationalDatabaseModel.pptx
relationalDatabaseModel.pptxNirajG3
 
The theory of relational databases
The theory of relational databasesThe theory of relational databases
The theory of relational databasesSperasoft
 
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
 
IS740 Chapter 05
IS740 Chapter 05IS740 Chapter 05
IS740 Chapter 05iDocs
 
database management system
database management systemdatabase management system
database management systemNivetha Ganesan
 

Similar to The relational database model (20)

Relational databases.pdf
Relational databases.pdfRelational databases.pdf
Relational databases.pdf
 
02010 ppt ch04
02010 ppt ch0402010 ppt ch04
02010 ppt ch04
 
Unit I Database concepts - RDBMS & ORACLE
Unit I  Database concepts - RDBMS & ORACLEUnit I  Database concepts - RDBMS & ORACLE
Unit I Database concepts - RDBMS & ORACLE
 
Relational model
Relational modelRelational model
Relational model
 
Relational Database.pptx
Relational Database.pptxRelational Database.pptx
Relational Database.pptx
 
02010 ppt ch02
02010 ppt ch0202010 ppt ch02
02010 ppt ch02
 
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
 
Codds rules & keys
Codds rules & keysCodds rules & keys
Codds rules & keys
 
Fundamentals of Database ppt ch02
Fundamentals of Database ppt ch02Fundamentals of Database ppt ch02
Fundamentals of Database ppt ch02
 
Db sys concept
Db sys conceptDb sys concept
Db sys concept
 
demo2.ppt
demo2.pptdemo2.ppt
demo2.ppt
 
chapter09-120827115409-phpapp01.pdf
chapter09-120827115409-phpapp01.pdfchapter09-120827115409-phpapp01.pdf
chapter09-120827115409-phpapp01.pdf
 
Chapter-5 The Relational Data Model
Chapter-5 The Relational Data ModelChapter-5 The Relational Data Model
Chapter-5 The Relational Data Model
 
ch2-slide Data Models.pptx
ch2-slide Data Models.pptxch2-slide Data Models.pptx
ch2-slide Data Models.pptx
 
ITE 101 - Week 7
ITE 101 - Week 7ITE 101 - Week 7
ITE 101 - Week 7
 
relationalDatabaseModel.pptx
relationalDatabaseModel.pptxrelationalDatabaseModel.pptx
relationalDatabaseModel.pptx
 
The theory of relational databases
The theory of relational databasesThe theory of relational databases
The theory of relational databases
 
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
 
IS740 Chapter 05
IS740 Chapter 05IS740 Chapter 05
IS740 Chapter 05
 
database management system
database management systemdatabase management system
database management system
 

More from Dhani Ahmad

Strategic information system planning
Strategic information system planningStrategic information system planning
Strategic information system planningDhani Ahmad
 
Opportunities, threats, industry competition, and competitor analysis
Opportunities, threats, industry competition, and competitor analysisOpportunities, threats, industry competition, and competitor analysis
Opportunities, threats, industry competition, and competitor analysisDhani Ahmad
 
Information resource management
Information resource managementInformation resource management
Information resource managementDhani Ahmad
 
Islamic information seeking behavior
Islamic information seeking behaviorIslamic information seeking behavior
Islamic information seeking behaviorDhani Ahmad
 
Islamic information management
Islamic information managementIslamic information management
Islamic information managementDhani Ahmad
 
Islamic information management sources in islam
Islamic information management sources in islamIslamic information management sources in islam
Islamic information management sources in islamDhani Ahmad
 
The need for security
The need for securityThe need for security
The need for securityDhani Ahmad
 
The information security audit
The information security auditThe information security audit
The information security auditDhani Ahmad
 
Security technologies
Security technologiesSecurity technologies
Security technologiesDhani Ahmad
 
Security and personnel
Security and personnelSecurity and personnel
Security and personnelDhani Ahmad
 
Risk management ii
Risk management iiRisk management ii
Risk management iiDhani Ahmad
 
Risk management i
Risk management iRisk management i
Risk management iDhani Ahmad
 
Privacy & security in heath care it
Privacy & security in heath care itPrivacy & security in heath care it
Privacy & security in heath care itDhani Ahmad
 
Physical security
Physical securityPhysical security
Physical securityDhani Ahmad
 
Legal, ethical & professional issues
Legal, ethical & professional issuesLegal, ethical & professional issues
Legal, ethical & professional issuesDhani Ahmad
 
Introduction to information security
Introduction to information securityIntroduction to information security
Introduction to information securityDhani Ahmad
 
Information security as an ongoing effort
Information security as an ongoing effortInformation security as an ongoing effort
Information security as an ongoing effortDhani Ahmad
 
Implementing security
Implementing securityImplementing security
Implementing securityDhani Ahmad
 

More from Dhani Ahmad (20)

Strategic information system planning
Strategic information system planningStrategic information system planning
Strategic information system planning
 
Opportunities, threats, industry competition, and competitor analysis
Opportunities, threats, industry competition, and competitor analysisOpportunities, threats, industry competition, and competitor analysis
Opportunities, threats, industry competition, and competitor analysis
 
Information resource management
Information resource managementInformation resource management
Information resource management
 
Islamic information seeking behavior
Islamic information seeking behaviorIslamic information seeking behavior
Islamic information seeking behavior
 
Islamic information management
Islamic information managementIslamic information management
Islamic information management
 
Islamic information management sources in islam
Islamic information management sources in islamIslamic information management sources in islam
Islamic information management sources in islam
 
The need for security
The need for securityThe need for security
The need for security
 
The information security audit
The information security auditThe information security audit
The information security audit
 
Security technologies
Security technologiesSecurity technologies
Security technologies
 
Security policy
Security policySecurity policy
Security policy
 
Security and personnel
Security and personnelSecurity and personnel
Security and personnel
 
Secure
SecureSecure
Secure
 
Risk management ii
Risk management iiRisk management ii
Risk management ii
 
Risk management i
Risk management iRisk management i
Risk management i
 
Privacy & security in heath care it
Privacy & security in heath care itPrivacy & security in heath care it
Privacy & security in heath care it
 
Physical security
Physical securityPhysical security
Physical security
 
Legal, ethical & professional issues
Legal, ethical & professional issuesLegal, ethical & professional issues
Legal, ethical & professional issues
 
Introduction to information security
Introduction to information securityIntroduction to information security
Introduction to information security
 
Information security as an ongoing effort
Information security as an ongoing effortInformation security as an ongoing effort
Information security as an ongoing effort
 
Implementing security
Implementing securityImplementing security
Implementing security
 

Recently uploaded

Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAroojKhan71
 
Discover Why Less is More in B2B Research
Discover Why Less is More in B2B ResearchDiscover Why Less is More in B2B Research
Discover Why Less is More in B2B Researchmichael115558
 
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
 
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
 
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
 
Halmar dropshipping via API with DroFx
Halmar  dropshipping  via API with DroFxHalmar  dropshipping  via API with DroFx
Halmar dropshipping via API with DroFxolyaivanovalion
 
Week-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interactionWeek-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interactionfulawalesam
 
Mature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxMature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxolyaivanovalion
 
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...amitlee9823
 
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...amitlee9823
 
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdfAccredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdfadriantubila
 
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...amitlee9823
 
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...amitlee9823
 
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -Pooja Nehwal
 
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...Delhi 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
 
Probability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter LessonsProbability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter LessonsJoseMangaJr1
 
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men  🔝malwa🔝   Escorts Ser...➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men  🔝malwa🔝   Escorts Ser...
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...amitlee9823
 

Recently uploaded (20)

Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
 
Discover Why Less is More in B2B Research
Discover Why Less is More in B2B ResearchDiscover Why Less is More in B2B Research
Discover Why Less is More in B2B Research
 
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
 
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
 
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...
 
Halmar dropshipping via API with DroFx
Halmar  dropshipping  via API with DroFxHalmar  dropshipping  via API with DroFx
Halmar dropshipping via API with DroFx
 
Week-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interactionWeek-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interaction
 
Mature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxMature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptx
 
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
 
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Thane West Call On 9920725232 With Body to body massage...
 
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdfAccredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
 
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
 
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
 
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
 
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escorts S...
 
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...
 
Probability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter LessonsProbability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter Lessons
 
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men  🔝malwa🔝   Escorts Ser...➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men  🔝malwa🔝   Escorts Ser...
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...
 
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts ServiceCall Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
 

The relational database model

  • 1. Database Systems: Design, Implementation, and Management Eighth Edition Chapter 3 The Relational Database Model
  • 2. Database Systems, 8th Edition 2 Objectives • In this chapter, you 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, 8th Edition 3 Objectives (continued) • In this chapter, you will learn: (continued) – 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, 8th 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 easier to understand than hierarchical and network models
  • 5. Database Systems, 8th Edition 5 Tables and Their Characteristics • Logical view of relational database 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 = an entity set
  • 6. Database Systems, 8th Edition 6 Attribute domain : range attribute. (attribute yang dihad-limitasikan) contoh: field nama hanya boleh di isi dgn 30 huruf sahaja. Setiap table perlu ada satu identifier yang membezakan sesuatu
  • 8. 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 functionally dependent on A if all rows in table that agree in value for A also agree in value for B ada banyak kunci selain PRIMARY KEY dan juga FOREIGN KEY peranan kunci adalah untuk “menentukan” apa. Rekod yang tak boleh menentukan attribute yang lain adalah rekod yang “functional independence” Sepatutnya setiap rekod akan menentukan attribute yang lain. FUNTIONAL DEPENDENCE merupakan rekod yang menentukan attribute yang lain. Attribute yang lain bergantung kepada rekod tersebut. Sekiranya attribute yang lain tidak bergantung kepada rekod tertentu, ianya merupakan FUNTIONAL INDEPENDENCE
  • 10. Database Systems, 8th Edition 10 Keys (continued) • 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 kunci yang menggabungkan 2 kunci atau lebih setiap attribute yang digabungkan menjadi kunci adalah key attribute the only one or more key yang menentukan attribute yang lain. Sepatutnya setiap rekod akan menentukan attribute yang lain. Sepatutnya setiap rekod akan menentukan attribute yang lain.
  • 11. Database Systems, 8th Edition 11 Keys (continued) • 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, 8th Edition 12 Keys (continued) • Nulls: – 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, 8th Edition 13 Keys (continued) • 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 mengawal pertindihan data
  • 16. Database Systems, 8th Edition 16 Keys (continued) • 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 tujuan secondary key adalah untuk searching
  • 17. Database Systems, 8th Edition 17 dalam candidate key tidak boleh ada superkey Foreign key tak apa kalau ada null value. Tapi primary key tak boleh ada null value
  • 20. Database Systems, 8th Edition 20 Integrity Rules • Many RDBMs enforce integrity rules automatically • Safer to ensure application design conforms to entity and referential integrity rules • Designers use flags to avoid nulls – Flags indicate absence of some value
  • 21. Database Systems, 8th 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 • UNION INTERSECT • DIFFERENCE PRODUCT • SELECT PROJECT JOIN DIVIDE
  • 28. Database Systems, 8th Edition 28 Relational Set Operators (continued) • 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 retained and any unmatched values in other table left null
  • 32. Database Systems, 8th 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
  • 34. Database Systems, 8th 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, 8th Edition 35 Relationships within the Relational Database (continued) • M:N relationships – Cannot be implemented as such in the relational model – M:N relationships can be changed into two 1:M relationships
  • 36. Database Systems, 8th Edition 36 The 1:M Relationship • Relational database norm • Found in any database environment
  • 38. Database Systems, 8th 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
  • 40. Database Systems, 8th 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
  • 46. Database Systems, 8th Edition 46 Data Redundancy Revisited • Data redundancy leads to data anomalies – Such 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
  • 48. Database Systems, 8th 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
  • 50. Database Systems, 8th 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, 8th 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. Database Systems, 8th Edition 52 Summary (continued) • Each table row must have a primary key that uniquely identifies all attributes • Tables 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