SlideShare ist ein Scribd-Unternehmen logo
1 von 12
Subject Name Code Credit Hours
Database System COMP 219 3
Chapter VII
Subject Name Code Credit Hours
Database System COMP 219 3
Relational Model:
• It uses a collection of tables to represent
both data and relationships among those
data.
Basic Structure
 In this model each table is called as
relation. Each relation has a no. of
row is called tuples and columns
called as fields or attributes.
Subject Name Code Credit Hours
Database System COMP 219 3
Relational Model:
• For an attribute, a range of permitted values
can be specified. That range is called as
Domain of that attribute.
• E.g.. Age – attribute
• Domain (Age) = {1,2…100}
Subject Name Code Credit Hours
Database System COMP 219 3
Relational Model:
• A table of n attributes must be a subset of
D1*D2*…….Dn
• E.g..
Eid Ename Eaddr
1
2
3
Aaa
Bbb
ccc
South street
West street
New
Employee Relation
Subject Name Code Credit Hours
Database System COMP 219 3
Relational Model:
• To denote the value of attribute ‘a’ on second
tuple, then it can be denoted as t2[a]=value.
• E.g..
• t2[ename]=“bbb”.
Subject Name Code Credit Hours
Database System COMP 219 3
Relation schema
• It is the description about the structure of the
relation and the relation instance is the
snapshot of data in the relation at a given
instant in time.
• E.g.. Employee_schema=(eid,ename,eaddr)
Name of the schema
Subject Name Code Credit Hours
Database System COMP 219 3
Relation schema
• Empoyee(Employee_schema) denote that
• Employee is a relation on Employee_schema
Subject Name Code Credit Hours
Database System COMP 219 3
Keys
• Strong Entity set:
• The Primary key of the entity set becomes the primary
key of the relation.
• Weak Entity Set:
• The table corresponding a weak entity set includes
• the attributes of the weak entity set &
• primary key of the strong entity set on which the weak
entity set depends.
Subject Name Code Credit Hours
Database System COMP 219 3
Keys
Relationship Set:
The union of the primary key of the related entity sets
becomes a super key of the relation.
Combined Tables:
If there exists many to one relationship set from A to B,
then the prim.key of A becomes the prim.key of the
relation & the relation consists of the attribues of A and
attributes of the relationship set.
Subject Name Code Credit Hours
Database System COMP 219 3
Keys
Foreign Key:
An attribute of a relation r1 that references
relation r2 is called as foreign key attribute.
Schema Diagram:
A relation schema can be depicted pictorially
by schema diagram,
Subject Name Code Credit Hours
Database System COMP 219 3
Keys
• E.g..
eid Ename eaddr dno
dnamedno dloc
Employee
pnamepno eid
Dept
Project
Subject Name Code Credit Hours
Database System COMP 219 3
Query Languages:
• It is a lang in which a user requests
information from db.
Query Languages
Procedural Language Non Procedural Language
Specifies what data are required &
specify how to get those data e.g
Relational Algebra
Specifies what data are required without
specify how to get those data e.g.
Relational calculus

Weitere ähnliche Inhalte

Ähnlich wie Dbms chapter vii

4_RelationalDataModelAndRelationalMapping.pdf
4_RelationalDataModelAndRelationalMapping.pdf4_RelationalDataModelAndRelationalMapping.pdf
4_RelationalDataModelAndRelationalMapping.pdf
LPhct2
 

Ähnlich wie Dbms chapter vii (20)

Relational model
Relational modelRelational model
Relational model
 
Relational model
Relational modelRelational model
Relational model
 
Dmbs chapter vi
Dmbs chapter viDmbs chapter vi
Dmbs chapter vi
 
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
 
Relational model and its utility%28 rajkumar%29.pptx
Relational model and its       utility%28 rajkumar%29.pptxRelational model and its       utility%28 rajkumar%29.pptx
Relational model and its utility%28 rajkumar%29.pptx
 
Unit 04 dbms
Unit 04 dbmsUnit 04 dbms
Unit 04 dbms
 
7.relational model
7.relational model7.relational model
7.relational model
 
Relational model
Relational modelRelational model
Relational model
 
Unit04 dbms
Unit04 dbmsUnit04 dbms
Unit04 dbms
 
Relational model
Relational modelRelational model
Relational model
 
Relational Database and Relational Algebra
Relational Database and Relational AlgebraRelational Database and Relational Algebra
Relational Database and Relational Algebra
 
DATABASE DESIGN.pptx
DATABASE DESIGN.pptxDATABASE DESIGN.pptx
DATABASE DESIGN.pptx
 
Relational Model on Database management PPT
Relational Model on Database management PPTRelational Model on Database management PPT
Relational Model on Database management PPT
 
DBMS Unit-2.pdf
DBMS Unit-2.pdfDBMS Unit-2.pdf
DBMS Unit-2.pdf
 
DBMS Class 3
DBMS Class 3DBMS Class 3
DBMS Class 3
 
ER Digramms by Harshal wagh
ER Digramms by Harshal waghER Digramms by Harshal wagh
ER Digramms by Harshal wagh
 
Relational Algebra
Relational AlgebraRelational Algebra
Relational Algebra
 
basic structure of SQL FINAL.pptx
basic structure of SQL FINAL.pptxbasic structure of SQL FINAL.pptx
basic structure of SQL FINAL.pptx
 
4_RelationalDataModelAndRelationalMapping.pdf
4_RelationalDataModelAndRelationalMapping.pdf4_RelationalDataModelAndRelationalMapping.pdf
4_RelationalDataModelAndRelationalMapping.pdf
 
RDBMS
RDBMSRDBMS
RDBMS
 

Mehr von Bala Ganesh

Dbms chapter iii
Dbms chapter iiiDbms chapter iii
Dbms chapter iii
Bala Ganesh
 
Flip flop& RAM ROM
Flip flop& RAM ROMFlip flop& RAM ROM
Flip flop& RAM ROM
Bala Ganesh
 
Chap iii-Logic Gates
Chap iii-Logic GatesChap iii-Logic Gates
Chap iii-Logic Gates
Bala Ganesh
 
Chap ii.BCD code,Gray code
Chap ii.BCD code,Gray codeChap ii.BCD code,Gray code
Chap ii.BCD code,Gray code
Bala Ganesh
 
Software engineering Questions and Answers
Software engineering Questions and AnswersSoftware engineering Questions and Answers
Software engineering Questions and Answers
Bala Ganesh
 
Software testing
Software testingSoftware testing
Software testing
Bala Ganesh
 
Software Requirements
Software RequirementsSoftware Requirements
Software Requirements
Bala Ganesh
 
Comp 111chp iv vi
Comp 111chp iv viComp 111chp iv vi
Comp 111chp iv vi
Bala Ganesh
 
Comp 107cep iii,iv,v
Comp 107cep iii,iv,vComp 107cep iii,iv,v
Comp 107cep iii,iv,v
Bala Ganesh
 
Wdf 222chp iii vi
Wdf 222chp iii viWdf 222chp iii vi
Wdf 222chp iii vi
Bala Ganesh
 

Mehr von Bala Ganesh (20)

Dbms chapter iii
Dbms chapter iiiDbms chapter iii
Dbms chapter iii
 
Dbms chapter ii
Dbms chapter iiDbms chapter ii
Dbms chapter ii
 
Flip flop& RAM ROM
Flip flop& RAM ROMFlip flop& RAM ROM
Flip flop& RAM ROM
 
karnaugh maps
karnaugh mapskarnaugh maps
karnaugh maps
 
Chap iii-Logic Gates
Chap iii-Logic GatesChap iii-Logic Gates
Chap iii-Logic Gates
 
Chap ii.BCD code,Gray code
Chap ii.BCD code,Gray codeChap ii.BCD code,Gray code
Chap ii.BCD code,Gray code
 
DEL-244Chep i
DEL-244Chep iDEL-244Chep i
DEL-244Chep i
 
Software engineering Questions and Answers
Software engineering Questions and AnswersSoftware engineering Questions and Answers
Software engineering Questions and Answers
 
Software testing
Software testingSoftware testing
Software testing
 
Design
DesignDesign
Design
 
Comp 107 cep 8
Comp 107 cep 8Comp 107 cep 8
Comp 107 cep 8
 
Comp 107 cep 7
Comp 107 cep 7Comp 107 cep 7
Comp 107 cep 7
 
Cocomo model
Cocomo modelCocomo model
Cocomo model
 
Software Requirements
Software RequirementsSoftware Requirements
Software Requirements
 
Comp107 chep6
Comp107 chep6Comp107 chep6
Comp107 chep6
 
Comp 111chp iv vi
Comp 111chp iv viComp 111chp iv vi
Comp 111chp iv vi
 
Comp 111 cep ii
Comp 111 cep iiComp 111 cep ii
Comp 111 cep ii
 
Comp 107cep iii,iv,v
Comp 107cep iii,iv,vComp 107cep iii,iv,v
Comp 107cep iii,iv,v
 
Wdf 222chp iii vi
Wdf 222chp iii viWdf 222chp iii vi
Wdf 222chp iii vi
 
Wdf222 cep ii
Wdf222 cep iiWdf222 cep ii
Wdf222 cep ii
 

Kürzlich hochgeladen

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 

Kürzlich hochgeladen (20)

microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Third Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxThird Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 

Dbms chapter vii

  • 1. Subject Name Code Credit Hours Database System COMP 219 3 Chapter VII
  • 2. Subject Name Code Credit Hours Database System COMP 219 3 Relational Model: • It uses a collection of tables to represent both data and relationships among those data. Basic Structure  In this model each table is called as relation. Each relation has a no. of row is called tuples and columns called as fields or attributes.
  • 3. Subject Name Code Credit Hours Database System COMP 219 3 Relational Model: • For an attribute, a range of permitted values can be specified. That range is called as Domain of that attribute. • E.g.. Age – attribute • Domain (Age) = {1,2…100}
  • 4. Subject Name Code Credit Hours Database System COMP 219 3 Relational Model: • A table of n attributes must be a subset of D1*D2*…….Dn • E.g.. Eid Ename Eaddr 1 2 3 Aaa Bbb ccc South street West street New Employee Relation
  • 5. Subject Name Code Credit Hours Database System COMP 219 3 Relational Model: • To denote the value of attribute ‘a’ on second tuple, then it can be denoted as t2[a]=value. • E.g.. • t2[ename]=“bbb”.
  • 6. Subject Name Code Credit Hours Database System COMP 219 3 Relation schema • It is the description about the structure of the relation and the relation instance is the snapshot of data in the relation at a given instant in time. • E.g.. Employee_schema=(eid,ename,eaddr) Name of the schema
  • 7. Subject Name Code Credit Hours Database System COMP 219 3 Relation schema • Empoyee(Employee_schema) denote that • Employee is a relation on Employee_schema
  • 8. Subject Name Code Credit Hours Database System COMP 219 3 Keys • Strong Entity set: • The Primary key of the entity set becomes the primary key of the relation. • Weak Entity Set: • The table corresponding a weak entity set includes • the attributes of the weak entity set & • primary key of the strong entity set on which the weak entity set depends.
  • 9. Subject Name Code Credit Hours Database System COMP 219 3 Keys Relationship Set: The union of the primary key of the related entity sets becomes a super key of the relation. Combined Tables: If there exists many to one relationship set from A to B, then the prim.key of A becomes the prim.key of the relation & the relation consists of the attribues of A and attributes of the relationship set.
  • 10. Subject Name Code Credit Hours Database System COMP 219 3 Keys Foreign Key: An attribute of a relation r1 that references relation r2 is called as foreign key attribute. Schema Diagram: A relation schema can be depicted pictorially by schema diagram,
  • 11. Subject Name Code Credit Hours Database System COMP 219 3 Keys • E.g.. eid Ename eaddr dno dnamedno dloc Employee pnamepno eid Dept Project
  • 12. Subject Name Code Credit Hours Database System COMP 219 3 Query Languages: • It is a lang in which a user requests information from db. Query Languages Procedural Language Non Procedural Language Specifies what data are required & specify how to get those data e.g Relational Algebra Specifies what data are required without specify how to get those data e.g. Relational calculus