SlideShare a Scribd company logo
Data Model
Data Models
 A collection of conceptual tools for
describing
 data
 data relationships
 data semantics
 data constraints
 Relational model
 Entity-Relationship model
 Other models:
 object-oriented model
 semi-structured data models
 Older models: network model and hierarchical model
Relational Data Structure
 RelationRelation
 A table with columns and rows
 AttributeAttribute
 Named column of a relation
 DomainDomain
 Set of allowable values for one or more attributes
 TupleTuple
 A row in a relation
 DegreeDegree (of a relation)
 The number of attributes it contains
 CardinalityCardinality (of a relation)
 The number of tuples it contains
3
Alternate Terminology
4
Formal Terms Alternative 1 Alternative 2
Relation Table File
Tuple Row Record
Attribute Column Field
Mathematical Relations
D1 = {2, 4} and D2 = {1, 3, 5}
D1xD2 = {(2,1), (2,3), (2,5), (4,1), (4,3), (4,5)}
• Any subset of this Cartesian Product is a Relation
5
Database Relations
 Relation SchemaRelation Schema
 A named relation defined by a set of attributes and
domain name pairs
 Relational Database SchemaRelational Database Schema
 A set of relation schemas each with a distinct name
6
Properties of Relations
 Has a name that is different from all other
relation names
 Each cell of a relation contains exactly one
atomic value (no arrays)
 Each attribute has a distinct name
 The values of an attribute are all from the same
domain
 Each tuple is distinct (no duplicate rows)
 The order of attributes has no significance
7
Relational Keys
 SuperkeySuperkey
 An attribute or a set of attributes that uniquely identifies a tuple
 Candidate KeyCandidate Key
 A superkey such that no proper subset is a superkey
 Primary KeyPrimary Key
 The candidate key that is selected to identify the tuples uniquely
 Foreign KeyForeign Key
 An attribute or a set of attributes within one relation that
matches the candidate key of some relation
8
Representing Relational
Database Schemas
Branch(branchNo, street, city, postCode)
Staff(staffNo, fName, lName, position, gender, DOB,
salary, branchNo)
PropertyForRent(propertyNo, street, city, postCode,
type, rooms, rent, ownerNo, staffNo, branchNo)
…
9
Relational Integrity
• Constraints placed on database in order to ensure
that the data is correct.
• For example, domain constraints, entity integrity
rules, referential integrity rules and other rules
(enterprise constraints)
10
Relational Integrity
 Entity IntegrityEntity Integrity
 In a relation no attribute of a primary key can be null.
 Referential IntegrityReferential Integrity
 If a foreign key exists in a relation, either the foreign
key value must match a candidate key value of some
tuple in its home/parent relation or the foreign key
must be wholly null.
11

More Related Content

What's hot

What's hot (20)

Object Based Databases
Object Based DatabasesObject Based Databases
Object Based Databases
 
Ooad unit – 1 introduction
Ooad unit – 1 introductionOoad unit – 1 introduction
Ooad unit – 1 introduction
 
Classes,object and methods java
Classes,object and methods javaClasses,object and methods java
Classes,object and methods java
 
Entity Relationship Diagrams
Entity Relationship DiagramsEntity Relationship Diagrams
Entity Relationship Diagrams
 
5. stored procedure and functions
5. stored procedure and functions5. stored procedure and functions
5. stored procedure and functions
 
DBMS 7 | Relational Query Language
DBMS 7 | Relational Query LanguageDBMS 7 | Relational Query Language
DBMS 7 | Relational Query Language
 
C++ [ principles of object oriented programming ]
C++ [ principles of object oriented programming ]C++ [ principles of object oriented programming ]
C++ [ principles of object oriented programming ]
 
Conceptual Data Modeling
Conceptual Data ModelingConceptual Data Modeling
Conceptual Data Modeling
 
Chapter-5 The Relational Data Model
Chapter-5 The Relational Data ModelChapter-5 The Relational Data Model
Chapter-5 The Relational Data Model
 
Rdbms
RdbmsRdbms
Rdbms
 
ARCHITECTURE OF DBMS (1).ppt
ARCHITECTURE OF DBMS (1).pptARCHITECTURE OF DBMS (1).ppt
ARCHITECTURE OF DBMS (1).ppt
 
Windows form application - C# Training
Windows form application - C# Training Windows form application - C# Training
Windows form application - C# Training
 
File and directories in python
File and directories in pythonFile and directories in python
File and directories in python
 
SYSTEM DESIGN by Neeraj Bhandari (Surkhet Nepal)
SYSTEM DESIGN by Neeraj Bhandari (Surkhet Nepal)SYSTEM DESIGN by Neeraj Bhandari (Surkhet Nepal)
SYSTEM DESIGN by Neeraj Bhandari (Surkhet Nepal)
 
Database systems - Chapter 1
Database systems - Chapter 1Database systems - Chapter 1
Database systems - Chapter 1
 
C++ OOPS Concept
C++ OOPS ConceptC++ OOPS Concept
C++ OOPS Concept
 
Windowforms controls c#
Windowforms controls c#Windowforms controls c#
Windowforms controls c#
 
Algo>Abstract data type
Algo>Abstract data typeAlgo>Abstract data type
Algo>Abstract data type
 
Advance Database Management Systems -Object Oriented Principles In Database
Advance Database Management Systems -Object Oriented Principles In DatabaseAdvance Database Management Systems -Object Oriented Principles In Database
Advance Database Management Systems -Object Oriented Principles In Database
 
Dbms Introduction and Basics
Dbms Introduction and BasicsDbms Introduction and Basics
Dbms Introduction and Basics
 

Viewers also liked

Database 3 Conceptual Modeling And Er
Database 3   Conceptual Modeling And ErDatabase 3   Conceptual Modeling And Er
Database 3 Conceptual Modeling And Er
Ashwani Kumar Ramani
 
Data Warehouse Modeling
Data Warehouse ModelingData Warehouse Modeling
Data Warehouse Modeling
vivekjv
 

Viewers also liked (13)

A Multidomain and Multilingual Conceptual Data Model for Online Reviews Repre...
A Multidomain and Multilingual Conceptual Data Model for Online Reviews Repre...A Multidomain and Multilingual Conceptual Data Model for Online Reviews Repre...
A Multidomain and Multilingual Conceptual Data Model for Online Reviews Repre...
 
Data Modeling
Data ModelingData Modeling
Data Modeling
 
Database 3 Conceptual Modeling And Er
Database 3   Conceptual Modeling And ErDatabase 3   Conceptual Modeling And Er
Database 3 Conceptual Modeling And Er
 
Data warehousing and Data mining
Data warehousing and Data mining Data warehousing and Data mining
Data warehousing and Data mining
 
Data-Ed Slides: Data Architecture Strategies - Constructing Your Data Garden
Data-Ed Slides: Data Architecture Strategies - Constructing Your Data GardenData-Ed Slides: Data Architecture Strategies - Constructing Your Data Garden
Data-Ed Slides: Data Architecture Strategies - Constructing Your Data Garden
 
Data Warehouse 101
Data Warehouse 101Data Warehouse 101
Data Warehouse 101
 
DATA WAREHOUSING
DATA WAREHOUSINGDATA WAREHOUSING
DATA WAREHOUSING
 
Data Mining and Data Warehousing
Data Mining and Data WarehousingData Mining and Data Warehousing
Data Mining and Data Warehousing
 
DATA WAREHOUSING AND DATA MINING
DATA WAREHOUSING AND DATA MININGDATA WAREHOUSING AND DATA MINING
DATA WAREHOUSING AND DATA MINING
 
Introduction to Data Warehousing
Introduction to Data WarehousingIntroduction to Data Warehousing
Introduction to Data Warehousing
 
Data Warehousing and Data Mining
Data Warehousing and Data MiningData Warehousing and Data Mining
Data Warehousing and Data Mining
 
Data Warehouse Modeling
Data Warehouse ModelingData Warehouse Modeling
Data Warehouse Modeling
 
Data modeling for the business
Data modeling for the businessData modeling for the business
Data modeling for the business
 

Similar to Data model

Lecture 07 relational database management system
Lecture 07 relational database management systemLecture 07 relational database management system
Lecture 07 relational database management system
emailharmeet
 
4_RelationalDataModelAndRelationalMapping.pdf
4_RelationalDataModelAndRelationalMapping.pdf4_RelationalDataModelAndRelationalMapping.pdf
4_RelationalDataModelAndRelationalMapping.pdf
LPhct2
 

Similar to Data model (20)

Lecture 07 relational database management system
Lecture 07 relational database management systemLecture 07 relational database management system
Lecture 07 relational database management system
 
Note Database Chapter2-Part 1.pdf and presentation
Note Database Chapter2-Part 1.pdf and presentationNote Database Chapter2-Part 1.pdf and presentation
Note Database Chapter2-Part 1.pdf and presentation
 
Rdbms
RdbmsRdbms
Rdbms
 
RDBMS
RDBMSRDBMS
RDBMS
 
Fundamentals of database system - Relational data model and relational datab...
Fundamentals of database system  - Relational data model and relational datab...Fundamentals of database system  - Relational data model and relational datab...
Fundamentals of database system - Relational data model and relational datab...
 
Dbms
DbmsDbms
Dbms
 
ER Digramms by Harshal wagh
ER Digramms by Harshal waghER Digramms by Harshal wagh
ER Digramms by Harshal wagh
 
Week 4 The Relational Data Model & The Entity Relationship Data Model
Week 4 The Relational Data Model & The Entity Relationship Data ModelWeek 4 The Relational Data Model & The Entity Relationship Data Model
Week 4 The Relational Data Model & The Entity Relationship Data Model
 
4_RelationalDataModelAndRelationalMapping.pdf
4_RelationalDataModelAndRelationalMapping.pdf4_RelationalDataModelAndRelationalMapping.pdf
4_RelationalDataModelAndRelationalMapping.pdf
 
The Relational Data Model and Relational Database Constraints Ch5 (Navathe 4t...
The Relational Data Model and Relational Database Constraints Ch5 (Navathe 4t...The Relational Data Model and Relational Database Constraints Ch5 (Navathe 4t...
The Relational Data Model and Relational Database Constraints Ch5 (Navathe 4t...
 
DBMS CS 4-5
DBMS CS 4-5DBMS CS 4-5
DBMS CS 4-5
 
looking for someone to do this Review Be able to explain, de.docx
looking for someone to do this Review Be able to explain, de.docxlooking for someone to do this Review Be able to explain, de.docx
looking for someone to do this Review Be able to explain, de.docx
 
Dbms ii mca-ch4-relational model-2013
Dbms ii mca-ch4-relational model-2013Dbms ii mca-ch4-relational model-2013
Dbms ii mca-ch4-relational model-2013
 
PPT_DBMS.pptx
PPT_DBMS.pptxPPT_DBMS.pptx
PPT_DBMS.pptx
 
2. relational model_150903
2. relational model_1509032. relational model_150903
2. relational model_150903
 
8.pptx
8.pptx8.pptx
8.pptx
 
DBMS Unit-2.pdf
DBMS Unit-2.pdfDBMS Unit-2.pdf
DBMS Unit-2.pdf
 
The relational data model part[1]
The relational data model part[1]The relational data model part[1]
The relational data model part[1]
 
relational model.pptx
relational model.pptxrelational model.pptx
relational model.pptx
 
Lecture-2 - Relational Model.pptx
Lecture-2 - Relational Model.pptxLecture-2 - Relational Model.pptx
Lecture-2 - Relational Model.pptx
 

More from Syed Zaid Irshad

Basic Concept of Information Technology
Basic Concept of Information TechnologyBasic Concept of Information Technology
Basic Concept of Information Technology
Syed Zaid Irshad
 
Introduction to ICS 1st Year Book
Introduction to ICS 1st Year BookIntroduction to ICS 1st Year Book
Introduction to ICS 1st Year Book
Syed Zaid Irshad
 

More from Syed Zaid Irshad (20)

Operating System.pdf
Operating System.pdfOperating System.pdf
Operating System.pdf
 
DBMS_Lab_Manual_&_Solution
DBMS_Lab_Manual_&_SolutionDBMS_Lab_Manual_&_Solution
DBMS_Lab_Manual_&_Solution
 
Data Structure and Algorithms.pptx
Data Structure and Algorithms.pptxData Structure and Algorithms.pptx
Data Structure and Algorithms.pptx
 
Design and Analysis of Algorithms.pptx
Design and Analysis of Algorithms.pptxDesign and Analysis of Algorithms.pptx
Design and Analysis of Algorithms.pptx
 
Professional Issues in Computing
Professional Issues in ComputingProfessional Issues in Computing
Professional Issues in Computing
 
Reduce course notes class xi
Reduce course notes class xiReduce course notes class xi
Reduce course notes class xi
 
Reduce course notes class xii
Reduce course notes class xiiReduce course notes class xii
Reduce course notes class xii
 
Introduction to Database
Introduction to DatabaseIntroduction to Database
Introduction to Database
 
C Language
C LanguageC Language
C Language
 
Flowchart
FlowchartFlowchart
Flowchart
 
Algorithm Pseudo
Algorithm PseudoAlgorithm Pseudo
Algorithm Pseudo
 
Computer Programming
Computer ProgrammingComputer Programming
Computer Programming
 
ICS 2nd Year Book Introduction
ICS 2nd Year Book IntroductionICS 2nd Year Book Introduction
ICS 2nd Year Book Introduction
 
Security, Copyright and the Law
Security, Copyright and the LawSecurity, Copyright and the Law
Security, Copyright and the Law
 
Computer Architecture
Computer ArchitectureComputer Architecture
Computer Architecture
 
Data Communication
Data CommunicationData Communication
Data Communication
 
Information Networks
Information NetworksInformation Networks
Information Networks
 
Basic Concept of Information Technology
Basic Concept of Information TechnologyBasic Concept of Information Technology
Basic Concept of Information Technology
 
Introduction to ICS 1st Year Book
Introduction to ICS 1st Year BookIntroduction to ICS 1st Year Book
Introduction to ICS 1st Year Book
 
Using the set operators
Using the set operatorsUsing the set operators
Using the set operators
 

Recently uploaded

Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdf
Kamal Acharya
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
ViniHema
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
RS Khurmi Machine Design Clutch and Brake Exercise Numerical Solutions
RS Khurmi Machine Design Clutch and Brake Exercise Numerical SolutionsRS Khurmi Machine Design Clutch and Brake Exercise Numerical Solutions
RS Khurmi Machine Design Clutch and Brake Exercise Numerical Solutions
Atif Razi
 
Online blood donation management system project.pdf
Online blood donation management system project.pdfOnline blood donation management system project.pdf
Online blood donation management system project.pdf
Kamal Acharya
 

Recently uploaded (20)

Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdf
 
Explosives Industry manufacturing process.pdf
Explosives Industry manufacturing process.pdfExplosives Industry manufacturing process.pdf
Explosives Industry manufacturing process.pdf
 
Introduction to Casting Processes in Manufacturing
Introduction to Casting Processes in ManufacturingIntroduction to Casting Processes in Manufacturing
Introduction to Casting Processes in Manufacturing
 
Natalia Rutkowska - BIM School Course in Kraków
Natalia Rutkowska - BIM School Course in KrakówNatalia Rutkowska - BIM School Course in Kraków
Natalia Rutkowska - BIM School Course in Kraków
 
Scaling in conventional MOSFET for constant electric field and constant voltage
Scaling in conventional MOSFET for constant electric field and constant voltageScaling in conventional MOSFET for constant electric field and constant voltage
Scaling in conventional MOSFET for constant electric field and constant voltage
 
Event Management System Vb Net Project Report.pdf
Event Management System Vb Net  Project Report.pdfEvent Management System Vb Net  Project Report.pdf
Event Management System Vb Net Project Report.pdf
 
Top 13 Famous Civil Engineering Scientist
Top 13 Famous Civil Engineering ScientistTop 13 Famous Civil Engineering Scientist
Top 13 Famous Civil Engineering Scientist
 
Halogenation process of chemical process industries
Halogenation process of chemical process industriesHalogenation process of chemical process industries
Halogenation process of chemical process industries
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
 
A CASE STUDY ON ONLINE TICKET BOOKING SYSTEM PROJECT.pdf
A CASE STUDY ON ONLINE TICKET BOOKING SYSTEM PROJECT.pdfA CASE STUDY ON ONLINE TICKET BOOKING SYSTEM PROJECT.pdf
A CASE STUDY ON ONLINE TICKET BOOKING SYSTEM PROJECT.pdf
 
Online resume builder management system project report.pdf
Online resume builder management system project report.pdfOnline resume builder management system project report.pdf
Online resume builder management system project report.pdf
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
fundamentals of drawing and isometric and orthographic projection
fundamentals of drawing and isometric and orthographic projectionfundamentals of drawing and isometric and orthographic projection
fundamentals of drawing and isometric and orthographic projection
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
 
RS Khurmi Machine Design Clutch and Brake Exercise Numerical Solutions
RS Khurmi Machine Design Clutch and Brake Exercise Numerical SolutionsRS Khurmi Machine Design Clutch and Brake Exercise Numerical Solutions
RS Khurmi Machine Design Clutch and Brake Exercise Numerical Solutions
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
 
Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.
 
Online blood donation management system project.pdf
Online blood donation management system project.pdfOnline blood donation management system project.pdf
Online blood donation management system project.pdf
 

Data model

  • 2. Data Models  A collection of conceptual tools for describing  data  data relationships  data semantics  data constraints  Relational model  Entity-Relationship model  Other models:  object-oriented model  semi-structured data models  Older models: network model and hierarchical model
  • 3. Relational Data Structure  RelationRelation  A table with columns and rows  AttributeAttribute  Named column of a relation  DomainDomain  Set of allowable values for one or more attributes  TupleTuple  A row in a relation  DegreeDegree (of a relation)  The number of attributes it contains  CardinalityCardinality (of a relation)  The number of tuples it contains 3
  • 4. Alternate Terminology 4 Formal Terms Alternative 1 Alternative 2 Relation Table File Tuple Row Record Attribute Column Field
  • 5. Mathematical Relations D1 = {2, 4} and D2 = {1, 3, 5} D1xD2 = {(2,1), (2,3), (2,5), (4,1), (4,3), (4,5)} • Any subset of this Cartesian Product is a Relation 5
  • 6. Database Relations  Relation SchemaRelation Schema  A named relation defined by a set of attributes and domain name pairs  Relational Database SchemaRelational Database Schema  A set of relation schemas each with a distinct name 6
  • 7. Properties of Relations  Has a name that is different from all other relation names  Each cell of a relation contains exactly one atomic value (no arrays)  Each attribute has a distinct name  The values of an attribute are all from the same domain  Each tuple is distinct (no duplicate rows)  The order of attributes has no significance 7
  • 8. Relational Keys  SuperkeySuperkey  An attribute or a set of attributes that uniquely identifies a tuple  Candidate KeyCandidate Key  A superkey such that no proper subset is a superkey  Primary KeyPrimary Key  The candidate key that is selected to identify the tuples uniquely  Foreign KeyForeign Key  An attribute or a set of attributes within one relation that matches the candidate key of some relation 8
  • 9. Representing Relational Database Schemas Branch(branchNo, street, city, postCode) Staff(staffNo, fName, lName, position, gender, DOB, salary, branchNo) PropertyForRent(propertyNo, street, city, postCode, type, rooms, rent, ownerNo, staffNo, branchNo) … 9
  • 10. Relational Integrity • Constraints placed on database in order to ensure that the data is correct. • For example, domain constraints, entity integrity rules, referential integrity rules and other rules (enterprise constraints) 10
  • 11. Relational Integrity  Entity IntegrityEntity Integrity  In a relation no attribute of a primary key can be null.  Referential IntegrityReferential Integrity  If a foreign key exists in a relation, either the foreign key value must match a candidate key value of some tuple in its home/parent relation or the foreign key must be wholly null. 11