SlideShare a Scribd company logo
Prepared by: Noha Mostafa Bakry Introduction to relational database
Where are relational databases? You cannot avoid it and it’s everywhere! You can say it actually makes the current society and your life work! Banking/Credit card /Social Security Info… Online shopping/booking…
What are relational databases? A relational database stores all its data inside tables, and nothing more.  All operations on data are done on the tables themselves or produces another tables as the result.  You never see anything except for tables.
Create relational database?
To create table must determine field name and data type and select primary key for table which must be unique and used for relations .
Table 2 contain ID as foreign key
Relation between tables 1-one to one . 2-one to many. 3 – many to many.
One to one In one-to-one relationship, two tables are associated in such a way that each record in first table can have only one matching record in second table, and each record in second table can have only one matching record in first table.
One to many In one-to-many relationship, two tables are associated in such a way that each record in the first table can have many matching records in second table, but a record in second table has only one matching record in first table.
Many  to many In many-to-many relationship, two tables are associated in such a way that each record in the first table can have many matching records in second table, and a record in second table can have many matching records in first table.
Relation between tables in our example is one to many.
What is E-R diagram? Short  for entity relationship diagram. Used to represent  relations between tables and  relation types.
What is Query ?  A database query is a request for information from a database.
normalization ,[object Object]
  There are two goals of the normalization process:   1-eliminating redundant data ( storing the same     data in more than one table) .   2- ensuring data dependencies (only storing related data in a table).
First normal form ,[object Object]
Create separate tables for each group of related data and identify each rowwith a unique column or set of columns (the primary key). ,[object Object]
Remove subsets of data that apply to multiple rows of a table and place them in separate tables.
Create relationships between these new tables and their predecessors through the use of foreign keys. ,[object Object]
Remove columns that are not dependent upon the primary key. ,[object Object],[object Object]
UPDATE PersonsSET Address='Nissestien 67', City='Sandnes'WHERE LastName='Tjessem' AND FirstName='Jakob‘ DELETE FROM PersonsWHERELastName='Tjessem'  AND FirstName='Jakob‘

More Related Content

What's hot

A short introduction to database systems.ppt
A short introduction to  database systems.pptA short introduction to  database systems.ppt
A short introduction to database systems.ppt
Muruly Krishan
 
Relational database revised
Relational database revisedRelational database revised
Relational database revised
mnodalo
 

What's hot (19)

Starting ms access 2010
Starting ms access 2010Starting ms access 2010
Starting ms access 2010
 
DATABASE CONCEPTS AND PRACTICAL EXAMPLES
DATABASE CONCEPTS AND PRACTICAL EXAMPLESDATABASE CONCEPTS AND PRACTICAL EXAMPLES
DATABASE CONCEPTS AND PRACTICAL EXAMPLES
 
L4 working with tables and data
L4 working with tables and dataL4 working with tables and data
L4 working with tables and data
 
A short introduction to database systems.ppt
A short introduction to  database systems.pptA short introduction to  database systems.ppt
A short introduction to database systems.ppt
 
Database management system
Database management systemDatabase management system
Database management system
 
Relational Database Fundamentals
Relational Database FundamentalsRelational Database Fundamentals
Relational Database Fundamentals
 
Keerty rdbms sql
Keerty rdbms sqlKeerty rdbms sql
Keerty rdbms sql
 
RDMS AND SQL
RDMS AND SQLRDMS AND SQL
RDMS AND SQL
 
Ch1- Introduction to dbms
Ch1- Introduction to dbmsCh1- Introduction to dbms
Ch1- Introduction to dbms
 
Week 1 Before the Advent of Database Systems & Fundamental Concepts
Week 1 Before the Advent of Database Systems & Fundamental ConceptsWeek 1 Before the Advent of Database Systems & Fundamental Concepts
Week 1 Before the Advent of Database Systems & Fundamental Concepts
 
Normalization
NormalizationNormalization
Normalization
 
RDBMS_Unit 01
RDBMS_Unit 01RDBMS_Unit 01
RDBMS_Unit 01
 
Relational database revised
Relational database revisedRelational database revised
Relational database revised
 
Introduction to databases
Introduction to databasesIntroduction to databases
Introduction to databases
 
Rdbms
RdbmsRdbms
Rdbms
 
RDBMS
RDBMSRDBMS
RDBMS
 
DATABASE PRESENTATION
DATABASE PRESENTATIONDATABASE PRESENTATION
DATABASE PRESENTATION
 
Sql introduction
Sql introductionSql introduction
Sql introduction
 
computer fund-database presentation
 computer fund-database presentation computer fund-database presentation
computer fund-database presentation
 

Similar to Intro To DataBase

introductiontodatabases-151106233350-lva1-app6892(2).pptx
introductiontodatabases-151106233350-lva1-app6892(2).pptxintroductiontodatabases-151106233350-lva1-app6892(2).pptx
introductiontodatabases-151106233350-lva1-app6892(2).pptx
KvkExambranch
 
Normalisation - 2nd normal form
Normalisation - 2nd normal formNormalisation - 2nd normal form
Normalisation - 2nd normal form
college
 
Database Management Systems 4 - Normalization
Database Management Systems 4 - NormalizationDatabase Management Systems 4 - Normalization
Database Management Systems 4 - Normalization
Nickkisha Farrell
 

Similar to Intro To DataBase (20)

Manjeet Singh.pptx
Manjeet Singh.pptxManjeet Singh.pptx
Manjeet Singh.pptx
 
introductiontodatabases-151106233350-lva1-app6892(2).pptx
introductiontodatabases-151106233350-lva1-app6892(2).pptxintroductiontodatabases-151106233350-lva1-app6892(2).pptx
introductiontodatabases-151106233350-lva1-app6892(2).pptx
 
DB- Lect #1 Intro.pdf
DB- Lect #1 Intro.pdfDB- Lect #1 Intro.pdf
DB- Lect #1 Intro.pdf
 
Sql interview questions and answers
Sql interview questions and  answersSql interview questions and  answers
Sql interview questions and answers
 
Key,ID Field and Tables Relationship
Key,ID Field and Tables Relationship Key,ID Field and Tables Relationship
Key,ID Field and Tables Relationship
 
T-SQL Overview
T-SQL OverviewT-SQL Overview
T-SQL Overview
 
Normalisation - 2nd normal form
Normalisation - 2nd normal formNormalisation - 2nd normal form
Normalisation - 2nd normal form
 
Dbms interview questions
Dbms interview questionsDbms interview questions
Dbms interview questions
 
Database.pptx
Database.pptxDatabase.pptx
Database.pptx
 
Understanding about relational database m-square systems inc
Understanding about relational database m-square systems incUnderstanding about relational database m-square systems inc
Understanding about relational database m-square systems inc
 
Sql interview q&a
Sql interview q&aSql interview q&a
Sql interview q&a
 
Relational Theory for Budding Einsteins -- LonestarPHP 2016
Relational Theory for Budding Einsteins -- LonestarPHP 2016Relational Theory for Budding Einsteins -- LonestarPHP 2016
Relational Theory for Budding Einsteins -- LonestarPHP 2016
 
Database Management Systems 4 - Normalization
Database Management Systems 4 - NormalizationDatabase Management Systems 4 - Normalization
Database Management Systems 4 - Normalization
 
Database Part 2
Database Part 2Database Part 2
Database Part 2
 
DBMS (UNIT 2)
DBMS (UNIT 2)DBMS (UNIT 2)
DBMS (UNIT 2)
 
Lecture 02-2-IIS.pptx
Lecture 02-2-IIS.pptxLecture 02-2-IIS.pptx
Lecture 02-2-IIS.pptx
 
ans_dbms.pdf
ans_dbms.pdfans_dbms.pdf
ans_dbms.pdf
 
Codds rules & keys
Codds rules & keysCodds rules & keys
Codds rules & keys
 
Database Concepts.pptx
Database Concepts.pptxDatabase Concepts.pptx
Database Concepts.pptx
 
Data normailazation
Data normailazationData normailazation
Data normailazation
 

More from DevMix (15)

Framework prototype
Framework prototypeFramework prototype
Framework prototype
 
Framework prototype
Framework prototypeFramework prototype
Framework prototype
 
Devmix algorithm
Devmix algorithmDevmix algorithm
Devmix algorithm
 
Select your career
Select your careerSelect your career
Select your career
 
Devmix algorithm
Devmix algorithmDevmix algorithm
Devmix algorithm
 
Framework prototype
Framework prototypeFramework prototype
Framework prototype
 
New in html5
New in html5New in html5
New in html5
 
Algorithms
AlgorithmsAlgorithms
Algorithms
 
Intro to windows app
Intro to windows appIntro to windows app
Intro to windows app
 
OOP in C#
OOP in C#OOP in C#
OOP in C#
 
Logos samples
Logos samplesLogos samples
Logos samples
 
C sharp fundamentals Part I
C sharp fundamentals Part IC sharp fundamentals Part I
C sharp fundamentals Part I
 
Python
PythonPython
Python
 
Making a presentation
Making a presentationMaking a presentation
Making a presentation
 
Cloud Computing
Cloud ComputingCloud Computing
Cloud Computing
 

Recently uploaded

Recently uploaded (20)

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Keeping Your Information Safe with Centralized Security Services
Keeping Your Information Safe with Centralized Security ServicesKeeping Your Information Safe with Centralized Security Services
Keeping Your Information Safe with Centralized Security Services
 
2024_Student Session 2_ Set Plan Preparation.pptx
2024_Student Session 2_ Set Plan Preparation.pptx2024_Student Session 2_ Set Plan Preparation.pptx
2024_Student Session 2_ Set Plan Preparation.pptx
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
 
Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.pptBasic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
How to the fix Attribute Error in odoo 17
How to the fix Attribute Error in odoo 17How to the fix Attribute Error in odoo 17
How to the fix Attribute Error in odoo 17
 
Basic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
Basic Civil Engg Notes_Chapter-6_Environment Pollution & EngineeringBasic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
Basic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
 
slides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptxslides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptx
 
size separation d pharm 1st year pharmaceutics
size separation d pharm 1st year pharmaceuticssize separation d pharm 1st year pharmaceutics
size separation d pharm 1st year pharmaceutics
 
Benefits and Challenges of Using Open Educational Resources
Benefits and Challenges of Using Open Educational ResourcesBenefits and Challenges of Using Open Educational Resources
Benefits and Challenges of Using Open Educational Resources
 
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdfTelling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
Matatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptxMatatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptx
 
Research Methods in Psychology | Cambridge AS Level | Cambridge Assessment In...
Research Methods in Psychology | Cambridge AS Level | Cambridge Assessment In...Research Methods in Psychology | Cambridge AS Level | Cambridge Assessment In...
Research Methods in Psychology | Cambridge AS Level | Cambridge Assessment In...
 
The Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. HenryThe Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. Henry
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
B.ed spl. HI pdusu exam paper-2023-24.pdf
B.ed spl. HI pdusu exam paper-2023-24.pdfB.ed spl. HI pdusu exam paper-2023-24.pdf
B.ed spl. HI pdusu exam paper-2023-24.pdf
 

Intro To DataBase

  • 1. Prepared by: Noha Mostafa Bakry Introduction to relational database
  • 2. Where are relational databases? You cannot avoid it and it’s everywhere! You can say it actually makes the current society and your life work! Banking/Credit card /Social Security Info… Online shopping/booking…
  • 3.
  • 4.
  • 5.
  • 6. What are relational databases? A relational database stores all its data inside tables, and nothing more. All operations on data are done on the tables themselves or produces another tables as the result. You never see anything except for tables.
  • 7.
  • 9.
  • 10. To create table must determine field name and data type and select primary key for table which must be unique and used for relations .
  • 11. Table 2 contain ID as foreign key
  • 12. Relation between tables 1-one to one . 2-one to many. 3 – many to many.
  • 13. One to one In one-to-one relationship, two tables are associated in such a way that each record in first table can have only one matching record in second table, and each record in second table can have only one matching record in first table.
  • 14.
  • 15. One to many In one-to-many relationship, two tables are associated in such a way that each record in the first table can have many matching records in second table, but a record in second table has only one matching record in first table.
  • 16.
  • 17. Many to many In many-to-many relationship, two tables are associated in such a way that each record in the first table can have many matching records in second table, and a record in second table can have many matching records in first table.
  • 18.
  • 19. Relation between tables in our example is one to many.
  • 20. What is E-R diagram? Short for entity relationship diagram. Used to represent relations between tables and relation types.
  • 21. What is Query ? A database query is a request for information from a database.
  • 22.
  • 23.
  • 24. There are two goals of the normalization process: 1-eliminating redundant data ( storing the same data in more than one table) . 2- ensuring data dependencies (only storing related data in a table).
  • 25.
  • 26.
  • 27. Remove subsets of data that apply to multiple rows of a table and place them in separate tables.
  • 28.
  • 29.
  • 30. UPDATE PersonsSET Address='Nissestien 67', City='Sandnes'WHERE LastName='Tjessem' AND FirstName='Jakob‘ DELETE FROM PersonsWHERELastName='Tjessem' AND FirstName='Jakob‘