SlideShare a Scribd company logo
1 of 11
Download to read offline
The Relational Model
History of Relational Model
1970 Paper by E.F. Codd “A Relational Model of Data for Large
Shared Data Banks” proposed relational model
System R, prototype developed at IBM Research Lab at San
Jose, California – late 1970s
Peterlee Test Vehicle, IBM UK Scientific Lab
INGRES, University of California at Berkeley
System R results used in developing DB2 from IBM and alsoSystem R results used in developing DB2 from IBM and also
Oracle
Early microcomputer based DBMSs were relational - dBase,
R;base, Paradox
Microsoft’s Access, now most popular microcomputer-based
DBMS, is relational
Oracle, DB2, Informix, Sybase, Microsoft’s SQL Server, MySQL
- most popular enterprise DBMSs, all relational
Advantages of Relational Model
• Provides data independence-separates logical from physical level
• Based on mathematical notion of relation
• Can use expressive, exact mathematical notation
• Theory provides tools for improving design
• Basic structure is simple, easy to understand
• Data operations easy to express, using a few powerful commands
• Operations do not require user to know storage structures used
Data Structures
• Relations are represented physically as tables
• Tables are related to one another
• Table holds information about entities (objects)Table holds information about entities (objects)
• Rows (tuples) correspond to individual records
• Columns correspond to attributes
• A column contains values from one domain
Properties of Tables
• Each cell contains at most one value
• Each column has a distinct name, the name of
the attribute it represents
• Values in a column all come from the same• Values in a column all come from the same
domain
• Each tuple is distinct – no duplicate tuples
• Order of tuples is immaterial
Example of Relational Model
• Student table tells facts about students
• Faculty table shows facts about faculty
• Class table shows facts about classes,
including what faculty member teaches eachincluding what faculty member teaches each
• Enroll table relates students to classes
Simple University Database
Student
stuId lastName firstName major credits
S1001 Smith Tom History 90
S1002 Chin Ann Math 36
S1005 Lee Perry History 3
S1010 Burns Edward Art 63
S1013 McCarthy Owen Math 0
S1015 Jones Mary Math 42
S1020 Rivera Jane CSC 15
Figure 4.1(a) The Student Table
Figure 4.1(c) The Class Table
Class
classNumber facId schedule room
ART103A F101 MWF9 H221
CSC201A F105 TuThF10 M110
CSC203A F105 MThF12 M110
HST205A F115 MWF11 H221
MTH101B F110 MTuTh9 H225
MTH103C F110 MWF11 H225
Enroll
Faculty
facId name department rank
F101 Adams Art Professor
F105 Tanaka CSC Instructor
F110 Byrne Math Assistant
F115 Smith History Associate
F221 Smith CSC Professor
Figure 4.1(b) The Faculty Table
Enroll
stuId classNumber grade
S1001 ART103A A
S1001 HST205A C
S1002 ART103A D
S1002 CSC201A F
S1002 MTH103C B
S1010 ART103A
S1010 MTH103C
S1020 CSC201A B
S1020 MTH101B A
Figure 4.1(d) The Enroll Table
• Each row of Student table represents one student
• Each row of Class table represents one class
• Each row of Enroll represents relationship between one student and one class
Properties of Relations
• Degree: the number of attributes
– 2 attributes - binary; 3 attributes - ternary; n
attributes - n-ary
– A property of the intension – does not change
unless database design changesunless database design changes
• Cardinality: the number of tuples
– Changes as tuples are added or deleted
– A property of the extension – changes often
• Keys
• Integrity constraints
Relation Keys
• Relations never have duplicate tuples, you can always tell tuples apart; implies
there is always a key (which may be a composite of all attributes, in worst
case)
• Superkey: set of attributes that uniquely identifies tuples
• Candidate key: superkey such that no proper subset of itself is also a superkey• Candidate key: superkey such that no proper subset of itself is also a superkey
(i.e. it has no unnecessary attributes)
• Primary key: candidate key chosen for unique identification of tuples
• Cannot verify a key by looking at an instance; need to consider semantic
information to ensure uniqueness
• A foreign key is an attribute or combination of attributes that is the primary
key of some relation (called its home relation)
Integrity Constraints
• Integrity: correctness and internal consistency
• Integrity constraints-rules or restrictions that apply to all
instances of the database
• Enforcing integrity constraints ensures only legal states of the
database are created
• Types of constraints• Types of constraints
– Domain constraint - limits set of values for attribute
– Entity integrity: no attribute of a primary key can have a null value
– Referential integrity: each foreign key value must match the primary
key value of some tuple in its home relation or be completely null.
– General constraints or business rules: may be expressed as table
constraints or assertions
Representing Relational Database
Schemas
• Can have any number of relation schemas
• For each relation schema, list name of relation followed by list
of attributes in parentheses
• Underline primary key in each relation schema
• Indicate foreign keys (We use italics – arrows are best)• Indicate foreign keys (We use italics – arrows are best)
• Database schema actually includes domains, views, character
sets, constraints, stored procedures, authorizations, etc.
• Example: University database schema
Student (stuId, lastName, firstName, major, credits)
Class (classNumber, facId, schedule, room)
Faculty (facId, name, department, rank)
Enroll(stuId,classNumber,grade)

More Related Content

What's hot

Database management system chapter5
Database management system chapter5Database management system chapter5
Database management system chapter5Pranab Dasgupta
 
An hour with Database and SQL
An hour with Database and SQLAn hour with Database and SQL
An hour with Database and SQLIraj Hedayati
 
Data Models In Database Management System
Data Models In Database Management SystemData Models In Database Management System
Data Models In Database Management SystemAmad Ahmad
 
All data models in dbms
All data models in dbmsAll data models in dbms
All data models in dbmsNaresh Kumar
 
Database Engineering: Part one
Database Engineering: Part oneDatabase Engineering: Part one
Database Engineering: Part oneChristoph Becher
 
Chapter-2 Database System Concepts and Architecture
Chapter-2 Database System Concepts and ArchitectureChapter-2 Database System Concepts and Architecture
Chapter-2 Database System Concepts and ArchitectureKunal Anand
 
Dbms relational model
Dbms relational modelDbms relational model
Dbms relational modelChirag vasava
 
Four Types of Data Models
Four Types of Data ModelsFour Types of Data Models
Four Types of Data ModelsDeanna Medina
 
Database Management Systems 1
Database Management Systems 1Database Management Systems 1
Database Management Systems 1Nickkisha Farrell
 
Basic Concept of Database
Basic Concept of DatabaseBasic Concept of Database
Basic Concept of DatabaseMarlon Jamera
 
Unit 4 rdbms study_material
Unit 4  rdbms study_materialUnit 4  rdbms study_material
Unit 4 rdbms study_materialgayaramesh
 
Unit 3 rdbms study_materials-converted
Unit 3  rdbms study_materials-convertedUnit 3  rdbms study_materials-converted
Unit 3 rdbms study_materials-convertedgayaramesh
 
Chapter 6 Database SC025 2017/2018
Chapter 6 Database SC025 2017/2018Chapter 6 Database SC025 2017/2018
Chapter 6 Database SC025 2017/2018Fizaril Amzari Omar
 

What's hot (19)

DBMS OF DATA MODEL Deepika 2
DBMS OF DATA MODEL  Deepika 2DBMS OF DATA MODEL  Deepika 2
DBMS OF DATA MODEL Deepika 2
 
Types of keys in database management system by Dr. Kamal Gulati
Types of keys in database management system by Dr. Kamal GulatiTypes of keys in database management system by Dr. Kamal Gulati
Types of keys in database management system by Dr. Kamal Gulati
 
Database management system chapter5
Database management system chapter5Database management system chapter5
Database management system chapter5
 
Relational databases
Relational databasesRelational databases
Relational databases
 
An hour with Database and SQL
An hour with Database and SQLAn hour with Database and SQL
An hour with Database and SQL
 
Data Models In Database Management System
Data Models In Database Management SystemData Models In Database Management System
Data Models In Database Management System
 
All data models in dbms
All data models in dbmsAll data models in dbms
All data models in dbms
 
Database Engineering: Part one
Database Engineering: Part oneDatabase Engineering: Part one
Database Engineering: Part one
 
Database Management & Models
Database Management & ModelsDatabase Management & Models
Database Management & Models
 
Chapter-2 Database System Concepts and Architecture
Chapter-2 Database System Concepts and ArchitectureChapter-2 Database System Concepts and Architecture
Chapter-2 Database System Concepts and Architecture
 
Dbms relational model
Dbms relational modelDbms relational model
Dbms relational model
 
Four Types of Data Models
Four Types of Data ModelsFour Types of Data Models
Four Types of Data Models
 
Database Management Systems 1
Database Management Systems 1Database Management Systems 1
Database Management Systems 1
 
DATA BASE MODEL Rohini
DATA BASE MODEL RohiniDATA BASE MODEL Rohini
DATA BASE MODEL Rohini
 
Basic Concept of Database
Basic Concept of DatabaseBasic Concept of Database
Basic Concept of Database
 
Unit 4 rdbms study_material
Unit 4  rdbms study_materialUnit 4  rdbms study_material
Unit 4 rdbms study_material
 
Unit 3 rdbms study_materials-converted
Unit 3  rdbms study_materials-convertedUnit 3  rdbms study_materials-converted
Unit 3 rdbms study_materials-converted
 
Chapter 6 Database SC025 2017/2018
Chapter 6 Database SC025 2017/2018Chapter 6 Database SC025 2017/2018
Chapter 6 Database SC025 2017/2018
 
Database
DatabaseDatabase
Database
 

Similar to RDBMS Model

Week 2 - Database System Development Lifecycle-old.pptx
Week 2 - Database System Development Lifecycle-old.pptxWeek 2 - Database System Development Lifecycle-old.pptx
Week 2 - Database System Development Lifecycle-old.pptxNurulIzrin
 
Data_base.pptx
Data_base.pptxData_base.pptx
Data_base.pptxMohit89650
 
PPT-UEU-Basis-Data-Pertemuan-1.pptx
PPT-UEU-Basis-Data-Pertemuan-1.pptxPPT-UEU-Basis-Data-Pertemuan-1.pptx
PPT-UEU-Basis-Data-Pertemuan-1.pptxUbaidURRahman78
 
Chapter-5 The Relational Data Model
Chapter-5 The Relational Data ModelChapter-5 The Relational Data Model
Chapter-5 The Relational Data ModelKunal Anand
 
Database Systems - Lecture Week 1
Database Systems - Lecture Week 1Database Systems - Lecture Week 1
Database Systems - Lecture Week 1Dios Kurniawan
 
Lecture-8-The-GIS-Database-Part-1.ppt
Lecture-8-The-GIS-Database-Part-1.pptLecture-8-The-GIS-Database-Part-1.ppt
Lecture-8-The-GIS-Database-Part-1.pptPrabin Pandit
 
Unit I Database concepts - RDBMS & ORACLE
Unit I  Database concepts - RDBMS & ORACLEUnit I  Database concepts - RDBMS & ORACLE
Unit I Database concepts - RDBMS & ORACLEDrkhanchanaR
 
Unit 2_DBMS_10.2.22.pptx
Unit 2_DBMS_10.2.22.pptxUnit 2_DBMS_10.2.22.pptx
Unit 2_DBMS_10.2.22.pptxMaryJoseph79
 
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
 
19IS305_U2_LP4_LM4-22-23.pdf
19IS305_U2_LP4_LM4-22-23.pdf19IS305_U2_LP4_LM4-22-23.pdf
19IS305_U2_LP4_LM4-22-23.pdfGOWTHAMR721887
 
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
 

Similar to RDBMS Model (20)

Week 2 - Database System Development Lifecycle-old.pptx
Week 2 - Database System Development Lifecycle-old.pptxWeek 2 - Database System Development Lifecycle-old.pptx
Week 2 - Database System Development Lifecycle-old.pptx
 
demo2.ppt
demo2.pptdemo2.ppt
demo2.ppt
 
Database intro
Database introDatabase intro
Database intro
 
DATABASE MANAGEMENT SYSTEM
DATABASE MANAGEMENT SYSTEMDATABASE MANAGEMENT SYSTEM
DATABASE MANAGEMENT SYSTEM
 
DBMS:Relational Modal
DBMS:Relational ModalDBMS:Relational Modal
DBMS:Relational Modal
 
Data_base.pptx
Data_base.pptxData_base.pptx
Data_base.pptx
 
Dbms relational data model and sql queries
Dbms relational data model and sql queries Dbms relational data model and sql queries
Dbms relational data model and sql queries
 
Database_Introduction.pdf
Database_Introduction.pdfDatabase_Introduction.pdf
Database_Introduction.pdf
 
relational database
relational databaserelational database
relational database
 
PPT-UEU-Basis-Data-Pertemuan-1.pptx
PPT-UEU-Basis-Data-Pertemuan-1.pptxPPT-UEU-Basis-Data-Pertemuan-1.pptx
PPT-UEU-Basis-Data-Pertemuan-1.pptx
 
Chapter-5 The Relational Data Model
Chapter-5 The Relational Data ModelChapter-5 The Relational Data Model
Chapter-5 The Relational Data Model
 
Database Systems - Lecture Week 1
Database Systems - Lecture Week 1Database Systems - Lecture Week 1
Database Systems - Lecture Week 1
 
Lecture-8-The-GIS-Database-Part-1.ppt
Lecture-8-The-GIS-Database-Part-1.pptLecture-8-The-GIS-Database-Part-1.ppt
Lecture-8-The-GIS-Database-Part-1.ppt
 
Unit I Database concepts - RDBMS & ORACLE
Unit I  Database concepts - RDBMS & ORACLEUnit I  Database concepts - RDBMS & ORACLE
Unit I Database concepts - RDBMS & ORACLE
 
Unit 2_DBMS_10.2.22.pptx
Unit 2_DBMS_10.2.22.pptxUnit 2_DBMS_10.2.22.pptx
Unit 2_DBMS_10.2.22.pptx
 
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
 
oracle
oracle oracle
oracle
 
19IS305_U2_LP4_LM4-22-23.pdf
19IS305_U2_LP4_LM4-22-23.pdf19IS305_U2_LP4_LM4-22-23.pdf
19IS305_U2_LP4_LM4-22-23.pdf
 
603s129
603s129603s129
603s129
 
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
 

More from Sarmad Ali

Network Engineer Interview Questions with Answers
Network Engineer Interview Questions with Answers Network Engineer Interview Questions with Answers
Network Engineer Interview Questions with Answers Sarmad Ali
 
RDBMS ER2 Relational
RDBMS ER2 RelationalRDBMS ER2 Relational
RDBMS ER2 RelationalSarmad Ali
 
RDBMS ERD Examples
RDBMS ERD ExamplesRDBMS ERD Examples
RDBMS ERD ExamplesSarmad Ali
 
Management Information System-MIS
Management Information System-MISManagement Information System-MIS
Management Information System-MISSarmad Ali
 
Classification of Compilers
Classification of CompilersClassification of Compilers
Classification of CompilersSarmad Ali
 
Compiler Construction
Compiler ConstructionCompiler Construction
Compiler ConstructionSarmad Ali
 
Introduction to Compiler Construction
Introduction to Compiler Construction Introduction to Compiler Construction
Introduction to Compiler Construction Sarmad Ali
 
Introduction to RDBMS
Introduction to RDBMSIntroduction to RDBMS
Introduction to RDBMSSarmad Ali
 
About Data Base
About Data BaseAbout Data Base
About Data BaseSarmad Ali
 
Management information system-MIS
Management information system-MISManagement information system-MIS
Management information system-MISSarmad Ali
 

More from Sarmad Ali (12)

Network Engineer Interview Questions with Answers
Network Engineer Interview Questions with Answers Network Engineer Interview Questions with Answers
Network Engineer Interview Questions with Answers
 
RDBMS Algebra
RDBMS AlgebraRDBMS Algebra
RDBMS Algebra
 
RDBMS ERD
RDBMS ERDRDBMS ERD
RDBMS ERD
 
RDBMS ER2 Relational
RDBMS ER2 RelationalRDBMS ER2 Relational
RDBMS ER2 Relational
 
RDBMS ERD Examples
RDBMS ERD ExamplesRDBMS ERD Examples
RDBMS ERD Examples
 
Management Information System-MIS
Management Information System-MISManagement Information System-MIS
Management Information System-MIS
 
Classification of Compilers
Classification of CompilersClassification of Compilers
Classification of Compilers
 
Compiler Construction
Compiler ConstructionCompiler Construction
Compiler Construction
 
Introduction to Compiler Construction
Introduction to Compiler Construction Introduction to Compiler Construction
Introduction to Compiler Construction
 
Introduction to RDBMS
Introduction to RDBMSIntroduction to RDBMS
Introduction to RDBMS
 
About Data Base
About Data BaseAbout Data Base
About Data Base
 
Management information system-MIS
Management information system-MISManagement information system-MIS
Management information system-MIS
 

Recently uploaded

Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 

Recently uploaded (20)

Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 

RDBMS Model

  • 2. History of Relational Model 1970 Paper by E.F. Codd “A Relational Model of Data for Large Shared Data Banks” proposed relational model System R, prototype developed at IBM Research Lab at San Jose, California – late 1970s Peterlee Test Vehicle, IBM UK Scientific Lab INGRES, University of California at Berkeley System R results used in developing DB2 from IBM and alsoSystem R results used in developing DB2 from IBM and also Oracle Early microcomputer based DBMSs were relational - dBase, R;base, Paradox Microsoft’s Access, now most popular microcomputer-based DBMS, is relational Oracle, DB2, Informix, Sybase, Microsoft’s SQL Server, MySQL - most popular enterprise DBMSs, all relational
  • 3. Advantages of Relational Model • Provides data independence-separates logical from physical level • Based on mathematical notion of relation • Can use expressive, exact mathematical notation • Theory provides tools for improving design • Basic structure is simple, easy to understand • Data operations easy to express, using a few powerful commands • Operations do not require user to know storage structures used
  • 4. Data Structures • Relations are represented physically as tables • Tables are related to one another • Table holds information about entities (objects)Table holds information about entities (objects) • Rows (tuples) correspond to individual records • Columns correspond to attributes • A column contains values from one domain
  • 5. Properties of Tables • Each cell contains at most one value • Each column has a distinct name, the name of the attribute it represents • Values in a column all come from the same• Values in a column all come from the same domain • Each tuple is distinct – no duplicate tuples • Order of tuples is immaterial
  • 6. Example of Relational Model • Student table tells facts about students • Faculty table shows facts about faculty • Class table shows facts about classes, including what faculty member teaches eachincluding what faculty member teaches each • Enroll table relates students to classes
  • 7. Simple University Database Student stuId lastName firstName major credits S1001 Smith Tom History 90 S1002 Chin Ann Math 36 S1005 Lee Perry History 3 S1010 Burns Edward Art 63 S1013 McCarthy Owen Math 0 S1015 Jones Mary Math 42 S1020 Rivera Jane CSC 15 Figure 4.1(a) The Student Table Figure 4.1(c) The Class Table Class classNumber facId schedule room ART103A F101 MWF9 H221 CSC201A F105 TuThF10 M110 CSC203A F105 MThF12 M110 HST205A F115 MWF11 H221 MTH101B F110 MTuTh9 H225 MTH103C F110 MWF11 H225 Enroll Faculty facId name department rank F101 Adams Art Professor F105 Tanaka CSC Instructor F110 Byrne Math Assistant F115 Smith History Associate F221 Smith CSC Professor Figure 4.1(b) The Faculty Table Enroll stuId classNumber grade S1001 ART103A A S1001 HST205A C S1002 ART103A D S1002 CSC201A F S1002 MTH103C B S1010 ART103A S1010 MTH103C S1020 CSC201A B S1020 MTH101B A Figure 4.1(d) The Enroll Table • Each row of Student table represents one student • Each row of Class table represents one class • Each row of Enroll represents relationship between one student and one class
  • 8. Properties of Relations • Degree: the number of attributes – 2 attributes - binary; 3 attributes - ternary; n attributes - n-ary – A property of the intension – does not change unless database design changesunless database design changes • Cardinality: the number of tuples – Changes as tuples are added or deleted – A property of the extension – changes often • Keys • Integrity constraints
  • 9. Relation Keys • Relations never have duplicate tuples, you can always tell tuples apart; implies there is always a key (which may be a composite of all attributes, in worst case) • Superkey: set of attributes that uniquely identifies tuples • Candidate key: superkey such that no proper subset of itself is also a superkey• Candidate key: superkey such that no proper subset of itself is also a superkey (i.e. it has no unnecessary attributes) • Primary key: candidate key chosen for unique identification of tuples • Cannot verify a key by looking at an instance; need to consider semantic information to ensure uniqueness • A foreign key is an attribute or combination of attributes that is the primary key of some relation (called its home relation)
  • 10. Integrity Constraints • Integrity: correctness and internal consistency • Integrity constraints-rules or restrictions that apply to all instances of the database • Enforcing integrity constraints ensures only legal states of the database are created • Types of constraints• Types of constraints – Domain constraint - limits set of values for attribute – Entity integrity: no attribute of a primary key can have a null value – Referential integrity: each foreign key value must match the primary key value of some tuple in its home relation or be completely null. – General constraints or business rules: may be expressed as table constraints or assertions
  • 11. Representing Relational Database Schemas • Can have any number of relation schemas • For each relation schema, list name of relation followed by list of attributes in parentheses • Underline primary key in each relation schema • Indicate foreign keys (We use italics – arrows are best)• Indicate foreign keys (We use italics – arrows are best) • Database schema actually includes domains, views, character sets, constraints, stored procedures, authorizations, etc. • Example: University database schema Student (stuId, lastName, firstName, major, credits) Class (classNumber, facId, schedule, room) Faculty (facId, name, department, rank) Enroll(stuId,classNumber,grade)