SlideShare a Scribd company logo
1 of 24
Data models
• Object based logical model
– E-R Model
– Object Oriented Model
• Record Based Logical Model
– Network Model
– Hierarchical Model
– Relational Model
RDBMS - Relational Database
Management System)
• A database based on the relational model developed
by E.F. Codd in 1960.
• A relational database allows the definition of data
structures, storage and retrieval operations and
integrity constraints.
• Properties of Relational Tables:
– Values Are Atomic
– Each Row is Unique
– Column Values Are of the Same Kind
– The Sequence of Columns is Insignificant
– The Sequence of Rows is Insignificant
– Each Column Has a Unique Name
– All operations are performed on an entire relation and
result is an entire relation a concept known as closure
Network model
• Record based logical model
• All data is store in collection of records. And
relationship with links.
• Organized as arbitrary graph.
• So, the network model permitted the modeling of
many-to-many relationships in data. Which is not
allowed in hierarchical model.
• Thus, the complete network of relationships is
represented by several pairwise sets; in each set some
(one) record type is owner (at the tail of the network
arrow) and one or more record types are members (at
the head of the relationship arrow).
• The main difference of the network model
from the hierarchical model, is its ability to
handle many to many (N:N) relations.
• No insertion, Deletion, updation anomaly.
• But required large number of pointers.
• Making structural changes is very difficult.
• Complex retrieval.
Hierarchical Data Model
• Record based logical model
• The hierarchical data model organizes data in a tree
structure. Rather than the arbitrary graph.
• It also forms a forest.
• All data is store in record or node. And relationship with
links. And fields with branches.
• Root of the tree is dummy node.
• There is a hierarchy of parent and child data segments.
• This structure implies that a record can have repeating
information, generally in the child data segments
• This restricts a child segment to having only one parent
segment.
• Hierarchical DBMSs were popular from the late 1960s, with
the introduction of IBM's Information Management System
(IMS) DBMS, through the 1970s.
Hierarchical Data Model
• One of the oldest database models from 1950.
• Information Management System (IMS) was
developed jointly by north American Rockwell
company and IBM.
• Adv : simplicity, security, data integrity, efficiency.
• Disadv : Implementation complexity,
management Problem, Lack of structural
Independence, program complexity, operational
anomalies, Implementation limitation.
Object-Oriented Model
• The object-oriented model can be seen as extending the E-
R model with notions of encapsulation, methods
(functions), and object identity.
• Model database as a Collection of objects.
• Each object has a Data (variable) and methods (functions)
• Same data variables and same type of functions will be
grouped together to form a class.
• Object DBMSs add database functionality to object
programming languages.
Object Name
Variables
Functions
• Postgres
• Starburst
• GemStone
• ONTOS
• ObjectStore
– Application
• CAD/CAM .
• Multimedia
Other models
• Object/Relational Model
• Semistructured Model
• Associative Model
• Entity-Attribute-Value (EAV) data model
• Context Model
• http://unixspace.com/context/databases.html
Relational data Model
• Use collection of tables to represent both data
and relationship among data.
– Table known as Relation
– Each table will have unique name
– Each column will have unique name
– Attributes -> Columns
– Possible set of Values in column is domain.
– Record of one entity -> rows -> tuple.
– Degree -> number of attributes in relation.
– Cardinality -> number of tuples in relation. Number of
values.
• Domain is a set of atomic values.
• Atomic means Each value indivisible.
• All operations are performed on an entire
relation and result is an entire relation a concept
is known as closure.
• Keys
– Primary
– Candidate
– Alternative
– Super
• Integrity Rules
– 1. Entity integrity rule: if Column A is a primary key it
cannot accept null value and all values will be unique
– 2. Referential integrity rule : cannot add a value in
foreign key column if that value doesnot exist in
primary key column.
Example of a Relation
account
Attribute Types
• Each attribute of a relation has a name
• The set of allowed values for each attribute is called the
domain of the attribute.
• Attribute values are (normally) required to be atomic, that is,
indivisible
– E.g. multivalued attribute values are not atomic
– E.g. composite attribute values are not atomic
• The special value null is a member of every domain
• Domain is a set of atomic values
• Atomic means Each value indivisible.
Relation Instance
• The current values (relation instance) of a relation are
specified by a table
• An element t of r is a tuple, represented by a row in a table
Jones
Smith
Curry
Lindsay
customer-name
Main
North
North
Park
customer-street
Harrison
Rye
Rye
Pittsfield
customer-city
customer
attributes
(or columns)
tuples
(or rows
Relations are Unordered
• Order of tuples is irrelevant (tuples may be stored in
an arbitrary order)
• E.g. account relation with unordered tuples
Database
• A database consists of multiple relations
• Information about an enterprise is broken up into parts, with each relation
storing one part of the information
E.g.: account : stores information about accounts
depositor : stores information about which customer owns
which account
customer : stores information about customers
• Storing all information as a single relation such as
bank (account-number, balance, customer-name, ..)
results in
– repetition of information (e.g. two customers own an account)
– the need for null values (e.g. represent a customer without an account)
E-R Diagram for the Banking Enterprise
The customer Relation
The depositor Relation
Keys
• Let K  R
• K is a superkey of R if values for K are sufficient to identify a
unique tuple of each possible relation r(R)
– by “possible r” we mean a relation r that could exist in the
enterprise we are modeling.
– Example: {customer-name, customer-street} and
{customer-name}
are both superkeys of Customer, if no two customers can
possibly have the same name.
• K is a candidate key if K is minimal
Example: {customer-name} is a candidate key for Customer
Determining Keys from E-R Sets
• Strong entity set. The primary key of the entity set becomes
the primary key of the relation.
• Weak entity set. The primary key of the relation consists of
the union of the primary key of the strong entity set and the
discriminator of the weak entity set.
• Relationship set. The union of the primary keys of the related
entity sets becomes a super key of the relation.
– For binary many-to-one relationship sets, the primary key
of the “many” entity set becomes the relation’s primary
key.
– For one-to-one relationship sets, the relation’s primary key
can be that of either entity set.
– For many-to-many relationship sets, the union of the
primary keys becomes the relation’s primary key
Query Languages
• Language in which user requests information from the
database. And interface b/w user and Database.
• Categories of languages
–Procedural : user has to specify what data
to get and also how to get those data.
(Procedure to obtain that data)
• Relational Algebra
–non-procedural : : user has to specify what
data to get without specifying how to get
those data.
• Relational Calculus
– Tuple Relational calculus
– Domain Relational calculus
Relational Algebra
• Procedural Query Languages.
• Operation to be performed on exciting relation to derive the result
relation.
• Unary operation.
– Select
– Project
– Rename
• Binary operation.
– Cartesian product
– Union
– Set difference
• Additional Operation
– Intersection
– Join
– Division
– Assignment

More Related Content

What's hot

Slide 2 data models
Slide 2 data modelsSlide 2 data models
Slide 2 data modelsVisakh V
 
Summary data modelling
Summary data modellingSummary data modelling
Summary data modellingNovita Sari
 
Relational Model - An Introduction
Relational Model - An IntroductionRelational Model - An Introduction
Relational Model - An IntroductionRajeev Srivastava
 
Data structure(Part 2)
Data structure(Part 2)Data structure(Part 2)
Data structure(Part 2)SURBHI SAROHA
 
Entity relationship modelling - DE L300
Entity relationship modelling - DE L300Entity relationship modelling - DE L300
Entity relationship modelling - DE L300Edwin Ayernor
 
Entity relationship diagram (erd)
Entity relationship diagram (erd)Entity relationship diagram (erd)
Entity relationship diagram (erd)tameemyousaf
 
Dbms relational model
Dbms relational modelDbms relational model
Dbms relational modelChirag vasava
 
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 & Introduction to UML
Data Models & Introduction to UML Data Models & Introduction to UML
Data Models & Introduction to UML نبيله نواز
 
Jarrar: Data Schema Integration
Jarrar: Data Schema IntegrationJarrar: Data Schema Integration
Jarrar: Data Schema IntegrationMustafa Jarrar
 
Relational database
Relational databaseRelational database
Relational databaseSanthiNivas
 
Introduction to ER Diagrams
Introduction to ER DiagramsIntroduction to ER Diagrams
Introduction to ER DiagramsAdri Jovin
 
E-R Diagram of College Management Systems
E-R Diagram of College Management SystemsE-R Diagram of College Management Systems
E-R Diagram of College Management SystemsOmprakash Chauhan
 
Advance database system(part 5)
Advance database system(part 5)Advance database system(part 5)
Advance database system(part 5)Abdullah Khosa
 

What's hot (19)

Slide 2 data models
Slide 2 data modelsSlide 2 data models
Slide 2 data models
 
Data model
Data modelData model
Data model
 
RDBMS Model
RDBMS ModelRDBMS Model
RDBMS Model
 
Summary data modelling
Summary data modellingSummary data modelling
Summary data modelling
 
Relational Model - An Introduction
Relational Model - An IntroductionRelational Model - An Introduction
Relational Model - An Introduction
 
Data structure(Part 2)
Data structure(Part 2)Data structure(Part 2)
Data structure(Part 2)
 
Entity relationship modelling - DE L300
Entity relationship modelling - DE L300Entity relationship modelling - DE L300
Entity relationship modelling - DE L300
 
Entity relationship diagram (erd)
Entity relationship diagram (erd)Entity relationship diagram (erd)
Entity relationship diagram (erd)
 
Dbms relational model
Dbms relational modelDbms relational model
Dbms relational model
 
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 & Introduction to UML
Data Models & Introduction to UML Data Models & Introduction to UML
Data Models & Introduction to UML
 
Jarrar: Data Schema Integration
Jarrar: Data Schema IntegrationJarrar: Data Schema Integration
Jarrar: Data Schema Integration
 
Db lec 02_new
Db lec 02_newDb lec 02_new
Db lec 02_new
 
singly linked_list
singly linked_listsingly linked_list
singly linked_list
 
Relational database
Relational databaseRelational database
Relational database
 
Revision ch 3
Revision ch 3Revision ch 3
Revision ch 3
 
Introduction to ER Diagrams
Introduction to ER DiagramsIntroduction to ER Diagrams
Introduction to ER Diagrams
 
E-R Diagram of College Management Systems
E-R Diagram of College Management SystemsE-R Diagram of College Management Systems
E-R Diagram of College Management Systems
 
Advance database system(part 5)
Advance database system(part 5)Advance database system(part 5)
Advance database system(part 5)
 

Similar to relational database

Database.ppt
Database.pptDatabase.ppt
Database.pptFaimHasan
 
Sql server ___________session_1-intro
Sql server  ___________session_1-introSql server  ___________session_1-intro
Sql server ___________session_1-introEhtisham Ali
 
DBMS & Data Models - In Introduction
DBMS & Data Models - In IntroductionDBMS & Data Models - In Introduction
DBMS & Data Models - In IntroductionRajeev Srivastava
 
Relational Database.pptx
Relational Database.pptxRelational Database.pptx
Relational Database.pptxSubhamSarkar64
 
Cs 371-lecture-02
Cs 371-lecture-02Cs 371-lecture-02
Cs 371-lecture-02Iqra Tariq
 
Unit I Database concepts - RDBMS & ORACLE
Unit I  Database concepts - RDBMS & ORACLEUnit I  Database concepts - RDBMS & ORACLE
Unit I Database concepts - RDBMS & ORACLEDrkhanchanaR
 
DATA MODEL PRESENTATION UNIT I-BCA I.pptx
DATA MODEL PRESENTATION UNIT I-BCA I.pptxDATA MODEL PRESENTATION UNIT I-BCA I.pptx
DATA MODEL PRESENTATION UNIT I-BCA I.pptxJasmineMichael1
 
Chapter – 2 Data Models.pdf
Chapter – 2 Data Models.pdfChapter – 2 Data Models.pdf
Chapter – 2 Data Models.pdfTamiratDejene1
 
Relational database (Unit 2)
Relational database (Unit 2)Relational database (Unit 2)
Relational database (Unit 2)Ismail Mukiibi
 
History of database processing module 1 (2)
History of database processing module 1 (2)History of database processing module 1 (2)
History of database processing module 1 (2)chottu89
 

Similar to relational database (20)

Database.ppt
Database.pptDatabase.ppt
Database.ppt
 
Sql server ___________session_1-intro
Sql server  ___________session_1-introSql server  ___________session_1-intro
Sql server ___________session_1-intro
 
DBMS & Data Models - In Introduction
DBMS & Data Models - In IntroductionDBMS & Data Models - In Introduction
DBMS & Data Models - In Introduction
 
DB2 on Mainframe
DB2 on MainframeDB2 on Mainframe
DB2 on Mainframe
 
Relational Database.pptx
Relational Database.pptxRelational Database.pptx
Relational Database.pptx
 
Db sys concept
Db sys conceptDb sys concept
Db sys concept
 
DATA MODELS.pptx
DATA MODELS.pptxDATA MODELS.pptx
DATA MODELS.pptx
 
Aparna RDBMS PPT.pptx
Aparna RDBMS PPT.pptxAparna RDBMS PPT.pptx
Aparna RDBMS PPT.pptx
 
Cs 371-lecture-02
Cs 371-lecture-02Cs 371-lecture-02
Cs 371-lecture-02
 
Unit I Database concepts - RDBMS & ORACLE
Unit I  Database concepts - RDBMS & ORACLEUnit I  Database concepts - RDBMS & ORACLE
Unit I Database concepts - RDBMS & ORACLE
 
DATA MODEL PRESENTATION UNIT I-BCA I.pptx
DATA MODEL PRESENTATION UNIT I-BCA I.pptxDATA MODEL PRESENTATION UNIT I-BCA I.pptx
DATA MODEL PRESENTATION UNIT I-BCA I.pptx
 
T-SQL
T-SQLT-SQL
T-SQL
 
(Dbms) class 1 & 2 (Presentation)
(Dbms) class 1 & 2 (Presentation)(Dbms) class 1 & 2 (Presentation)
(Dbms) class 1 & 2 (Presentation)
 
Chapter – 2 Data Models.pdf
Chapter – 2 Data Models.pdfChapter – 2 Data Models.pdf
Chapter – 2 Data Models.pdf
 
Relational database (Unit 2)
Relational database (Unit 2)Relational database (Unit 2)
Relational database (Unit 2)
 
DBMS
DBMS DBMS
DBMS
 
DISE - Database Concepts
DISE - Database ConceptsDISE - Database Concepts
DISE - Database Concepts
 
History of database processing module 1 (2)
History of database processing module 1 (2)History of database processing module 1 (2)
History of database processing module 1 (2)
 
Different data models
Different data modelsDifferent data models
Different data models
 
dsa.pptx
dsa.pptxdsa.pptx
dsa.pptx
 

More from Surya Swaroop

Pie chart - qualitative aptitude
Pie chart - qualitative aptitude Pie chart - qualitative aptitude
Pie chart - qualitative aptitude Surya Swaroop
 
Simplification and data interpretation table
Simplification and data interpretation tableSimplification and data interpretation table
Simplification and data interpretation tableSurya Swaroop
 
Quantitative aptitude table data interpretation
Quantitative aptitude  table data interpretationQuantitative aptitude  table data interpretation
Quantitative aptitude table data interpretationSurya Swaroop
 
Environmental engineering text book
Environmental engineering text bookEnvironmental engineering text book
Environmental engineering text bookSurya Swaroop
 
Development of surfaces
Development of surfacesDevelopment of surfaces
Development of surfacesSurya Swaroop
 
Design and Drawing of Steel Structures
Design and Drawing of Steel StructuresDesign and Drawing of Steel Structures
Design and Drawing of Steel StructuresSurya Swaroop
 
Design & Drawing of Steel Structures
 Design & Drawing of Steel Structures Design & Drawing of Steel Structures
Design & Drawing of Steel StructuresSurya Swaroop
 
design drawing of steel structures
design drawing of steel structuresdesign drawing of steel structures
design drawing of steel structuresSurya Swaroop
 
design-and-drawing Steel structures
design-and-drawing Steel structuresdesign-and-drawing Steel structures
design-and-drawing Steel structuresSurya Swaroop
 
design drawing steel structures
design drawing steel structuresdesign drawing steel structures
design drawing steel structuresSurya Swaroop
 
Integration material
Integration material Integration material
Integration material Surya Swaroop
 
deadlock and locking - dbms
deadlock and locking -  dbmsdeadlock and locking -  dbms
deadlock and locking - dbmsSurya Swaroop
 
transaction management, concept & State
transaction management, concept & Statetransaction management, concept & State
transaction management, concept & StateSurya Swaroop
 
relational algebra Tuple Relational Calculus - database management system
relational algebra Tuple Relational Calculus - database management systemrelational algebra Tuple Relational Calculus - database management system
relational algebra Tuple Relational Calculus - database management systemSurya Swaroop
 

More from Surya Swaroop (20)

Pie chart - qualitative aptitude
Pie chart - qualitative aptitude Pie chart - qualitative aptitude
Pie chart - qualitative aptitude
 
Simplification and data interpretation table
Simplification and data interpretation tableSimplification and data interpretation table
Simplification and data interpretation table
 
Quantitative aptitude table data interpretation
Quantitative aptitude  table data interpretationQuantitative aptitude  table data interpretation
Quantitative aptitude table data interpretation
 
Environmental engineering text book
Environmental engineering text bookEnvironmental engineering text book
Environmental engineering text book
 
Development of surfaces
Development of surfacesDevelopment of surfaces
Development of surfaces
 
Elasticity
ElasticityElasticity
Elasticity
 
Design and Drawing of Steel Structures
Design and Drawing of Steel StructuresDesign and Drawing of Steel Structures
Design and Drawing of Steel Structures
 
Design & Drawing of Steel Structures
 Design & Drawing of Steel Structures Design & Drawing of Steel Structures
Design & Drawing of Steel Structures
 
design drawing of steel structures
design drawing of steel structuresdesign drawing of steel structures
design drawing of steel structures
 
design-and-drawing Steel structures
design-and-drawing Steel structuresdesign-and-drawing Steel structures
design-and-drawing Steel structures
 
design drawing steel structures
design drawing steel structuresdesign drawing steel structures
design drawing steel structures
 
Integration material
Integration material Integration material
Integration material
 
Probability
ProbabilityProbability
Probability
 
Other transform dip
Other transform dipOther transform dip
Other transform dip
 
deadlock and locking - dbms
deadlock and locking -  dbmsdeadlock and locking -  dbms
deadlock and locking - dbms
 
transaction management, concept & State
transaction management, concept & Statetransaction management, concept & State
transaction management, concept & State
 
relational algebra Tuple Relational Calculus - database management system
relational algebra Tuple Relational Calculus - database management systemrelational algebra Tuple Relational Calculus - database management system
relational algebra Tuple Relational Calculus - database management system
 
er question dbms
er question dbmser question dbms
er question dbms
 
dbms er model
dbms er modeldbms er model
dbms er model
 
data base
data basedata base
data base
 

Recently uploaded

AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.arsicmarija21
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
“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
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 

Recently uploaded (20)

AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
“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...
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
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🔝
 

relational database

  • 2. • Object based logical model – E-R Model – Object Oriented Model • Record Based Logical Model – Network Model – Hierarchical Model – Relational Model
  • 3. RDBMS - Relational Database Management System) • A database based on the relational model developed by E.F. Codd in 1960. • A relational database allows the definition of data structures, storage and retrieval operations and integrity constraints. • Properties of Relational Tables: – Values Are Atomic – Each Row is Unique – Column Values Are of the Same Kind – The Sequence of Columns is Insignificant – The Sequence of Rows is Insignificant – Each Column Has a Unique Name – All operations are performed on an entire relation and result is an entire relation a concept known as closure
  • 4. Network model • Record based logical model • All data is store in collection of records. And relationship with links. • Organized as arbitrary graph. • So, the network model permitted the modeling of many-to-many relationships in data. Which is not allowed in hierarchical model. • Thus, the complete network of relationships is represented by several pairwise sets; in each set some (one) record type is owner (at the tail of the network arrow) and one or more record types are members (at the head of the relationship arrow).
  • 5. • The main difference of the network model from the hierarchical model, is its ability to handle many to many (N:N) relations. • No insertion, Deletion, updation anomaly. • But required large number of pointers. • Making structural changes is very difficult. • Complex retrieval.
  • 6. Hierarchical Data Model • Record based logical model • The hierarchical data model organizes data in a tree structure. Rather than the arbitrary graph. • It also forms a forest. • All data is store in record or node. And relationship with links. And fields with branches. • Root of the tree is dummy node. • There is a hierarchy of parent and child data segments. • This structure implies that a record can have repeating information, generally in the child data segments • This restricts a child segment to having only one parent segment. • Hierarchical DBMSs were popular from the late 1960s, with the introduction of IBM's Information Management System (IMS) DBMS, through the 1970s.
  • 7. Hierarchical Data Model • One of the oldest database models from 1950. • Information Management System (IMS) was developed jointly by north American Rockwell company and IBM. • Adv : simplicity, security, data integrity, efficiency. • Disadv : Implementation complexity, management Problem, Lack of structural Independence, program complexity, operational anomalies, Implementation limitation.
  • 8. Object-Oriented Model • The object-oriented model can be seen as extending the E- R model with notions of encapsulation, methods (functions), and object identity. • Model database as a Collection of objects. • Each object has a Data (variable) and methods (functions) • Same data variables and same type of functions will be grouped together to form a class. • Object DBMSs add database functionality to object programming languages. Object Name Variables Functions
  • 9. • Postgres • Starburst • GemStone • ONTOS • ObjectStore – Application • CAD/CAM . • Multimedia
  • 10. Other models • Object/Relational Model • Semistructured Model • Associative Model • Entity-Attribute-Value (EAV) data model • Context Model • http://unixspace.com/context/databases.html
  • 11. Relational data Model • Use collection of tables to represent both data and relationship among data. – Table known as Relation – Each table will have unique name – Each column will have unique name – Attributes -> Columns – Possible set of Values in column is domain. – Record of one entity -> rows -> tuple. – Degree -> number of attributes in relation. – Cardinality -> number of tuples in relation. Number of values. • Domain is a set of atomic values. • Atomic means Each value indivisible.
  • 12. • All operations are performed on an entire relation and result is an entire relation a concept is known as closure. • Keys – Primary – Candidate – Alternative – Super • Integrity Rules – 1. Entity integrity rule: if Column A is a primary key it cannot accept null value and all values will be unique – 2. Referential integrity rule : cannot add a value in foreign key column if that value doesnot exist in primary key column.
  • 13. Example of a Relation account
  • 14. Attribute Types • Each attribute of a relation has a name • The set of allowed values for each attribute is called the domain of the attribute. • Attribute values are (normally) required to be atomic, that is, indivisible – E.g. multivalued attribute values are not atomic – E.g. composite attribute values are not atomic • The special value null is a member of every domain • Domain is a set of atomic values • Atomic means Each value indivisible.
  • 15. Relation Instance • The current values (relation instance) of a relation are specified by a table • An element t of r is a tuple, represented by a row in a table Jones Smith Curry Lindsay customer-name Main North North Park customer-street Harrison Rye Rye Pittsfield customer-city customer attributes (or columns) tuples (or rows
  • 16. Relations are Unordered • Order of tuples is irrelevant (tuples may be stored in an arbitrary order) • E.g. account relation with unordered tuples
  • 17. Database • A database consists of multiple relations • Information about an enterprise is broken up into parts, with each relation storing one part of the information E.g.: account : stores information about accounts depositor : stores information about which customer owns which account customer : stores information about customers • Storing all information as a single relation such as bank (account-number, balance, customer-name, ..) results in – repetition of information (e.g. two customers own an account) – the need for null values (e.g. represent a customer without an account)
  • 18. E-R Diagram for the Banking Enterprise
  • 21. Keys • Let K  R • K is a superkey of R if values for K are sufficient to identify a unique tuple of each possible relation r(R) – by “possible r” we mean a relation r that could exist in the enterprise we are modeling. – Example: {customer-name, customer-street} and {customer-name} are both superkeys of Customer, if no two customers can possibly have the same name. • K is a candidate key if K is minimal Example: {customer-name} is a candidate key for Customer
  • 22. Determining Keys from E-R Sets • Strong entity set. The primary key of the entity set becomes the primary key of the relation. • Weak entity set. The primary key of the relation consists of the union of the primary key of the strong entity set and the discriminator of the weak entity set. • Relationship set. The union of the primary keys of the related entity sets becomes a super key of the relation. – For binary many-to-one relationship sets, the primary key of the “many” entity set becomes the relation’s primary key. – For one-to-one relationship sets, the relation’s primary key can be that of either entity set. – For many-to-many relationship sets, the union of the primary keys becomes the relation’s primary key
  • 23. Query Languages • Language in which user requests information from the database. And interface b/w user and Database. • Categories of languages –Procedural : user has to specify what data to get and also how to get those data. (Procedure to obtain that data) • Relational Algebra –non-procedural : : user has to specify what data to get without specifying how to get those data. • Relational Calculus – Tuple Relational calculus – Domain Relational calculus
  • 24. Relational Algebra • Procedural Query Languages. • Operation to be performed on exciting relation to derive the result relation. • Unary operation. – Select – Project – Rename • Binary operation. – Cartesian product – Union – Set difference • Additional Operation – Intersection – Join – Division – Assignment