SlideShare a Scribd company logo
1 of 15
Download to read offline
Reviewing Basic Concepts of
Relational Database
Prof. Hitesh Mohapatra
Why there is need of database?
• Multiple file with the same content.
• Multiple file with different content but with
same name.
• Updation of information into multiple files.
• Data are stored at multiple locations.
What is database?
• A Database is a system that allows everyone
to share, manage and use data.
• Reduces data redundancy
• Reduces updating errors and increased consistency
• Greater data integrity and independence from
applications programs
• Improvises data access to users through use of
host and query languages
• Improves data security
• Reduces data entry, storage, and retrieval costs
• Facilitated development of new applications
program Database
What are the disadvantages of
database?
• Database systems are complex, difficult, and
time-consuming to design
• Substantial hardware and software start-up costs
• Damage to database affects virtually all
applications programs
• Extensive conversion costs in moving form a file-
based system to a database system
• Initial training required for all programmers and
users
What are the types of databases
available?
• Hierarchical Data Model, in
which there is a tree-like
relationship between data.
• Network Data Model, in
which pieces of data have
overlapping relationships
with each other.
• Relational Data Model,
process data using the easy-
to-understand concept of
table.
What is a Relational Database?
• A relational database is a type of database.
• It uses a structure that allows us to identify
and access data in relation to another piece of
data in the database.
• Data in a relational database is organized into
tables.
Table, Record, Field, Row & Column
• A table is a set of data elements (values).
• A piece of data in a file is called a record.
• Each item in a record is called a field.
• One piece of data or record is called a row.
• Each item or field is called a column.
Types of keys
• Key: One or more columns in a database table that is used to sort and/or identify rows in a
table. e.g. if you were sorting people by the field salary then the salary field is the key.
• Primary key: A primary key is a one or more fields that uniquely identifies a row in a table.
The primary key cannot be null (blank). The primary key is indexed (more on index later).
• Foreign key: A foreign key is a relationship between columns in two database tables (one of
which is indexed) designed to insure consistency of data.
• Composite key: A primary key composed of one or more columns. The primary key can be
formed using the fields (though not very advisable).
• Natural key: A composite primary key which is composed of attributes (fields) which already
exist in the real world (for example First Name, Last Name, Social Security Number).
• Surrogate key: A primary key which is internally generated (typically auto-incremental integer
value) that does not exist in the real world (for example, ID which serves to identify the
record but nothing else).
• Candidate key: A column, or set of columns, in a table that can uniquely identify any
database record without referring to any other data. Each table may have one or more
candidate keys, but one candidate key is unique (the primary key).
• Compound key: A composite key consisting of two or more fields that uniquely describe a
row in a table. The difference between compound and candidate is that all of the fields in the
compound key are foreign keys; in the candidate key one or more of the fields may be foreign
keys (but it is not mandatory).
How to design a database?
When you try to create a database yourself, the
first step is to determine the conditions of the
data you are trying to model.
The E-R model
E refers Entity. A recognizable object in the real world. For
example, when exporting fruits to other
countries, fruit and export destination can be considered
entities. Represented with a rectangle.
• Each entity has attributes,
particular properties that
describe the entity (Product
Name in Fruit, for example).
Represented with an ovallus.
• R refers relationship. How entities
relate with each other. For example,
fruits and export destination are
associated with each other because
you sell fruits to export
destinations. Represented with a
diamond. Fruit is exported to many
Export destinations and Export
destination purchases many kinds of
fruit. We call this a many-to-many
relationship. In the E-R model the
number of associations between
entities is considered, this is
called cardinality.
• Cardinality: Number of associations between
entities.
• One-to-one relationship (1-1): I only sell fruits to you
and you only buy fruits from me.
• One-to-many (or many-to-one) relationship (n-1 or 1-n):
I sell fruits to other families and those families buy fruits
only from me.
• Many-to-many relationship (n-n): You have an example
above.
Normalization
Process of tabulating data from the real world
for a relational database, following a series of
steps. It is necessary to Normalize data in order
to properly manage a relational database.
Normalization is used for mainly two purposes:
• Eliminating redundant(useless) data.
• Ensuring data dependencies make sense i.e. data is
logically stored.
Steps for designing a database
• Determine the purpose of the database.
• Determine the tables needed.
• Identify needed fields.
• Identify exclusive fields.
• Determine relations between tables.
• Define constraints to preserve data integrity
(don't forget normalization).
Reviewing basic concepts of relational database

More Related Content

What's hot

Database management system presentation
Database management system presentationDatabase management system presentation
Database management system presentation
sameerraaj
 
Database Presentation
Database PresentationDatabase Presentation
Database Presentation
a9oolq8
 

What's hot (20)

Database Management System
Database Management SystemDatabase Management System
Database Management System
 
Integrity Constraints
Integrity ConstraintsIntegrity Constraints
Integrity Constraints
 
Basic Concept Of Database Management System (DBMS) [Presentation Slide]
Basic Concept Of Database Management System (DBMS) [Presentation Slide]Basic Concept Of Database Management System (DBMS) [Presentation Slide]
Basic Concept Of Database Management System (DBMS) [Presentation Slide]
 
The relational database model
The relational database modelThe relational database model
The relational database model
 
Database management system presentation
Database management system presentationDatabase management system presentation
Database management system presentation
 
Database Presentation
Database PresentationDatabase Presentation
Database Presentation
 
Relational database
Relational database Relational database
Relational database
 
Rdbms
RdbmsRdbms
Rdbms
 
Relational Data Model Introduction
Relational Data Model IntroductionRelational Data Model Introduction
Relational Data Model Introduction
 
Relational Database Design
Relational Database DesignRelational Database Design
Relational Database Design
 
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
 
Dbms relational model
Dbms relational modelDbms relational model
Dbms relational model
 
Introduction to database
Introduction to databaseIntroduction to database
Introduction to database
 
Introduction to Database
Introduction to DatabaseIntroduction to Database
Introduction to Database
 
Advantages and disadvantages of DBMS
Advantages and disadvantages of DBMSAdvantages and disadvantages of DBMS
Advantages and disadvantages of DBMS
 
1.4 data independence
1.4 data independence1.4 data independence
1.4 data independence
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship Diagram
 
Chapter02
Chapter02Chapter02
Chapter02
 
Data base management system
Data base management systemData base management system
Data base management system
 
File systems versus a dbms
File systems versus a dbmsFile systems versus a dbms
File systems versus a dbms
 

Similar to Reviewing basic concepts of relational database

Info systems databases
Info systems databasesInfo systems databases
Info systems databases
MR Z
 
Data and functional modeling
Data and functional modelingData and functional modeling
Data and functional modeling
Slideshare
 
ds 1 Introduction to Data Structures.ppt
ds 1 Introduction to Data Structures.pptds 1 Introduction to Data Structures.ppt
ds 1 Introduction to Data Structures.ppt
AlliVinay1
 
3.1 Database structure - designing a system.ppt
3.1 Database structure - designing a system.ppt3.1 Database structure - designing a system.ppt
3.1 Database structure - designing a system.ppt
AghaSyedNaqvi
 

Similar to Reviewing basic concepts of relational database (20)

demo2.ppt
demo2.pptdemo2.ppt
demo2.ppt
 
Data structures
Data structuresData structures
Data structures
 
relational database
relational databaserelational database
relational database
 
Info systems databases
Info systems databasesInfo systems databases
Info systems databases
 
Lecture 01 Intro to DSA
Lecture 01 Intro to DSALecture 01 Intro to DSA
Lecture 01 Intro to DSA
 
Lec20.pptx introduction to data bases and information systems
Lec20.pptx introduction to data bases and information systemsLec20.pptx introduction to data bases and information systems
Lec20.pptx introduction to data bases and information systems
 
Presentation Datatbase Final.pptx
Presentation Datatbase Final.pptxPresentation Datatbase Final.pptx
Presentation Datatbase Final.pptx
 
Introduction to ms access database
Introduction to ms access databaseIntroduction to ms access database
Introduction to ms access database
 
Relational data base management system (Unit 1)
Relational data base management system (Unit 1)Relational data base management system (Unit 1)
Relational data base management system (Unit 1)
 
Introduction to Data Warehousing
Introduction to Data WarehousingIntroduction to Data Warehousing
Introduction to Data Warehousing
 
Data and functional modeling
Data and functional modelingData and functional modeling
Data and functional modeling
 
Data dictionary
Data dictionaryData dictionary
Data dictionary
 
ER Digramms by Harshal wagh
ER Digramms by Harshal waghER Digramms by Harshal wagh
ER Digramms by Harshal wagh
 
Etl - Extract Transform Load
Etl - Extract Transform LoadEtl - Extract Transform Load
Etl - Extract Transform Load
 
Sql server ___________session_1-intro
Sql server  ___________session_1-introSql server  ___________session_1-intro
Sql server ___________session_1-intro
 
Chapter 6
Chapter 6Chapter 6
Chapter 6
 
Database
DatabaseDatabase
Database
 
Database management system
Database management systemDatabase management system
Database management system
 
ds 1 Introduction to Data Structures.ppt
ds 1 Introduction to Data Structures.pptds 1 Introduction to Data Structures.ppt
ds 1 Introduction to Data Structures.ppt
 
3.1 Database structure - designing a system.ppt
3.1 Database structure - designing a system.ppt3.1 Database structure - designing a system.ppt
3.1 Database structure - designing a system.ppt
 

More from Hitesh Mohapatra

Harnessing the Power of Google Cloud Platform: Strategies and Applications
Harnessing the Power of Google Cloud Platform: Strategies and ApplicationsHarnessing the Power of Google Cloud Platform: Strategies and Applications
Harnessing the Power of Google Cloud Platform: Strategies and Applications
Hitesh Mohapatra
 

More from Hitesh Mohapatra (20)

Virtualization: A Key to Efficient Cloud Computing
Virtualization: A Key to Efficient Cloud ComputingVirtualization: A Key to Efficient Cloud Computing
Virtualization: A Key to Efficient Cloud Computing
 
Automating the Cloud: A Deep Dive into Virtual Machine Provisioning
Automating the Cloud: A Deep Dive into Virtual Machine ProvisioningAutomating the Cloud: A Deep Dive into Virtual Machine Provisioning
Automating the Cloud: A Deep Dive into Virtual Machine Provisioning
 
Harnessing the Power of Google Cloud Platform: Strategies and Applications
Harnessing the Power of Google Cloud Platform: Strategies and ApplicationsHarnessing the Power of Google Cloud Platform: Strategies and Applications
Harnessing the Power of Google Cloud Platform: Strategies and Applications
 
Scheduling in Cloud Computing
Scheduling in Cloud ComputingScheduling in Cloud Computing
Scheduling in Cloud Computing
 
Cloud-Case study
Cloud-Case study Cloud-Case study
Cloud-Case study
 
RAID
RAIDRAID
RAID
 
Load balancing in cloud computing.pptx
Load balancing in cloud computing.pptxLoad balancing in cloud computing.pptx
Load balancing in cloud computing.pptx
 
Cluster Computing
Cluster ComputingCluster Computing
Cluster Computing
 
ITU-T requirement for cloud and cloud deployment model
ITU-T requirement for cloud and cloud deployment modelITU-T requirement for cloud and cloud deployment model
ITU-T requirement for cloud and cloud deployment model
 
Leetcode Problem Solution
Leetcode Problem SolutionLeetcode Problem Solution
Leetcode Problem Solution
 
Leetcode Problem Solution
Leetcode Problem SolutionLeetcode Problem Solution
Leetcode Problem Solution
 
Trie Data Structure
Trie Data Structure Trie Data Structure
Trie Data Structure
 
Reviewing SQL Concepts
Reviewing SQL ConceptsReviewing SQL Concepts
Reviewing SQL Concepts
 
Advanced database protocols
Advanced database protocolsAdvanced database protocols
Advanced database protocols
 
Measures of query cost
Measures of query costMeasures of query cost
Measures of query cost
 
Involvement of WSN in Smart Cities
Involvement of WSN in Smart CitiesInvolvement of WSN in Smart Cities
Involvement of WSN in Smart Cities
 
Data Structure and its Fundamentals
Data Structure and its FundamentalsData Structure and its Fundamentals
Data Structure and its Fundamentals
 
WORKING WITH FILE AND PIPELINE PARAMETER BINDING
WORKING WITH FILE AND PIPELINE PARAMETER BINDINGWORKING WITH FILE AND PIPELINE PARAMETER BINDING
WORKING WITH FILE AND PIPELINE PARAMETER BINDING
 
Basic commands for powershell : Configuring Windows PowerShell and working wi...
Basic commands for powershell : Configuring Windows PowerShell and working wi...Basic commands for powershell : Configuring Windows PowerShell and working wi...
Basic commands for powershell : Configuring Windows PowerShell and working wi...
 
WINDOWS ADMINISTRATION AND WORKING WITH OBJECTS : PowerShell ISE
WINDOWS ADMINISTRATION AND WORKING WITH OBJECTS : PowerShell ISEWINDOWS ADMINISTRATION AND WORKING WITH OBJECTS : PowerShell ISE
WINDOWS ADMINISTRATION AND WORKING WITH OBJECTS : PowerShell ISE
 

Recently uploaded

Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...
Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...
Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...
drjose256
 
Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..
MaherOthman7
 
Microkernel in Operating System | Operating System
Microkernel in Operating System | Operating SystemMicrokernel in Operating System | Operating System
Microkernel in Operating System | Operating System
Sampad Kar
 

Recently uploaded (20)

Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...
Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...
Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...
 
Operating System chapter 9 (Virtual Memory)
Operating System chapter 9 (Virtual Memory)Operating System chapter 9 (Virtual Memory)
Operating System chapter 9 (Virtual Memory)
 
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
 
Diploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdfDiploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdf
 
SLIDESHARE PPT-DECISION MAKING METHODS.pptx
SLIDESHARE PPT-DECISION MAKING METHODS.pptxSLIDESHARE PPT-DECISION MAKING METHODS.pptx
SLIDESHARE PPT-DECISION MAKING METHODS.pptx
 
Introduction to Artificial Intelligence and History of AI
Introduction to Artificial Intelligence and History of AIIntroduction to Artificial Intelligence and History of AI
Introduction to Artificial Intelligence and History of AI
 
Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..
 
Raashid final report on Embedded Systems
Raashid final report on Embedded SystemsRaashid final report on Embedded Systems
Raashid final report on Embedded Systems
 
Introduction to Heat Exchangers: Principle, Types and Applications
Introduction to Heat Exchangers: Principle, Types and ApplicationsIntroduction to Heat Exchangers: Principle, Types and Applications
Introduction to Heat Exchangers: Principle, Types and Applications
 
Microkernel in Operating System | Operating System
Microkernel in Operating System | Operating SystemMicrokernel in Operating System | Operating System
Microkernel in Operating System | Operating System
 
5G and 6G refer to generations of mobile network technology, each representin...
5G and 6G refer to generations of mobile network technology, each representin...5G and 6G refer to generations of mobile network technology, each representin...
5G and 6G refer to generations of mobile network technology, each representin...
 
Supermarket billing system project report..pdf
Supermarket billing system project report..pdfSupermarket billing system project report..pdf
Supermarket billing system project report..pdf
 
Multivibrator and its types defination and usges.pptx
Multivibrator and its types defination and usges.pptxMultivibrator and its types defination and usges.pptx
Multivibrator and its types defination and usges.pptx
 
analog-vs-digital-communication (concept of analog and digital).pptx
analog-vs-digital-communication (concept of analog and digital).pptxanalog-vs-digital-communication (concept of analog and digital).pptx
analog-vs-digital-communication (concept of analog and digital).pptx
 
Research Methodolgy & Intellectual Property Rights Series 1
Research Methodolgy & Intellectual Property Rights Series 1Research Methodolgy & Intellectual Property Rights Series 1
Research Methodolgy & Intellectual Property Rights Series 1
 
How to Design and spec harmonic filter.pdf
How to Design and spec harmonic filter.pdfHow to Design and spec harmonic filter.pdf
How to Design and spec harmonic filter.pdf
 
Quiz application system project report..pdf
Quiz application system project report..pdfQuiz application system project report..pdf
Quiz application system project report..pdf
 
Interfacing Analog to Digital Data Converters ee3404.pdf
Interfacing Analog to Digital Data Converters ee3404.pdfInterfacing Analog to Digital Data Converters ee3404.pdf
Interfacing Analog to Digital Data Converters ee3404.pdf
 
Geometric constructions Engineering Drawing.pdf
Geometric constructions Engineering Drawing.pdfGeometric constructions Engineering Drawing.pdf
Geometric constructions Engineering Drawing.pdf
 
Fabrication Of Automatic Star Delta Starter Using Relay And GSM Module By Utk...
Fabrication Of Automatic Star Delta Starter Using Relay And GSM Module By Utk...Fabrication Of Automatic Star Delta Starter Using Relay And GSM Module By Utk...
Fabrication Of Automatic Star Delta Starter Using Relay And GSM Module By Utk...
 

Reviewing basic concepts of relational database

  • 1. Reviewing Basic Concepts of Relational Database Prof. Hitesh Mohapatra
  • 2. Why there is need of database? • Multiple file with the same content. • Multiple file with different content but with same name. • Updation of information into multiple files. • Data are stored at multiple locations.
  • 3. What is database? • A Database is a system that allows everyone to share, manage and use data. • Reduces data redundancy • Reduces updating errors and increased consistency • Greater data integrity and independence from applications programs • Improvises data access to users through use of host and query languages • Improves data security • Reduces data entry, storage, and retrieval costs • Facilitated development of new applications program Database
  • 4. What are the disadvantages of database? • Database systems are complex, difficult, and time-consuming to design • Substantial hardware and software start-up costs • Damage to database affects virtually all applications programs • Extensive conversion costs in moving form a file- based system to a database system • Initial training required for all programmers and users
  • 5. What are the types of databases available? • Hierarchical Data Model, in which there is a tree-like relationship between data. • Network Data Model, in which pieces of data have overlapping relationships with each other. • Relational Data Model, process data using the easy- to-understand concept of table.
  • 6. What is a Relational Database? • A relational database is a type of database. • It uses a structure that allows us to identify and access data in relation to another piece of data in the database. • Data in a relational database is organized into tables.
  • 7. Table, Record, Field, Row & Column • A table is a set of data elements (values). • A piece of data in a file is called a record. • Each item in a record is called a field. • One piece of data or record is called a row. • Each item or field is called a column.
  • 8. Types of keys • Key: One or more columns in a database table that is used to sort and/or identify rows in a table. e.g. if you were sorting people by the field salary then the salary field is the key. • Primary key: A primary key is a one or more fields that uniquely identifies a row in a table. The primary key cannot be null (blank). The primary key is indexed (more on index later). • Foreign key: A foreign key is a relationship between columns in two database tables (one of which is indexed) designed to insure consistency of data. • Composite key: A primary key composed of one or more columns. The primary key can be formed using the fields (though not very advisable). • Natural key: A composite primary key which is composed of attributes (fields) which already exist in the real world (for example First Name, Last Name, Social Security Number). • Surrogate key: A primary key which is internally generated (typically auto-incremental integer value) that does not exist in the real world (for example, ID which serves to identify the record but nothing else). • Candidate key: A column, or set of columns, in a table that can uniquely identify any database record without referring to any other data. Each table may have one or more candidate keys, but one candidate key is unique (the primary key). • Compound key: A composite key consisting of two or more fields that uniquely describe a row in a table. The difference between compound and candidate is that all of the fields in the compound key are foreign keys; in the candidate key one or more of the fields may be foreign keys (but it is not mandatory).
  • 9. How to design a database? When you try to create a database yourself, the first step is to determine the conditions of the data you are trying to model.
  • 10. The E-R model E refers Entity. A recognizable object in the real world. For example, when exporting fruits to other countries, fruit and export destination can be considered entities. Represented with a rectangle. • Each entity has attributes, particular properties that describe the entity (Product Name in Fruit, for example). Represented with an ovallus.
  • 11. • R refers relationship. How entities relate with each other. For example, fruits and export destination are associated with each other because you sell fruits to export destinations. Represented with a diamond. Fruit is exported to many Export destinations and Export destination purchases many kinds of fruit. We call this a many-to-many relationship. In the E-R model the number of associations between entities is considered, this is called cardinality.
  • 12. • Cardinality: Number of associations between entities. • One-to-one relationship (1-1): I only sell fruits to you and you only buy fruits from me. • One-to-many (or many-to-one) relationship (n-1 or 1-n): I sell fruits to other families and those families buy fruits only from me. • Many-to-many relationship (n-n): You have an example above.
  • 13. Normalization Process of tabulating data from the real world for a relational database, following a series of steps. It is necessary to Normalize data in order to properly manage a relational database. Normalization is used for mainly two purposes: • Eliminating redundant(useless) data. • Ensuring data dependencies make sense i.e. data is logically stored.
  • 14. Steps for designing a database • Determine the purpose of the database. • Determine the tables needed. • Identify needed fields. • Identify exclusive fields. • Determine relations between tables. • Define constraints to preserve data integrity (don't forget normalization).