SlideShare a Scribd company logo
Prepared by
The Smartpath Information Systems
www.thesmartpath.in
BASIC RDBMS CONCEPTS
Index
1. what is RDBMS
2. Database concepts
3. Explanation
4. Database three tier architecture
5. Relational Model
6. E-R Diagram
7. E-R Diagram (Explanation)
8. E-R Diagram (Explanation)
9. Rules for RDBMS
10. Keys in RDBMS
11. Keys in RDBMS(continue)
12. SQL in RDBMS
13. Basic Datatypes in SQL
Index
14. Operators in SQL - Arithmetic
15. Operators in SQL - Comparison
16. Operators in SQL - Logical
17. Operator with Examples - comparison operator
18. Operator with Examples - LIKE operator
19. Operator with Examples - AND operator
20. Operator with Examples - IN operator
21. RDBMS Databases - MYSQL
22. RDBMS Databases - MS SQL Server
23. RDBMS Databases - Oracle
What is RDBMS
RDBMS - Relational Database Management System
It is database management system based on relational model , which is
used to manage relational database. Relational model is organization of
data in tables which are interrelated.
Relational Database
It is organized collection of tables. Data is stored in tables. Tables are
related to each other using one or more fields.
.
Database concepts
Table
A table is collection of rows and columns. In RDBMS table is called Relation
and rows are called as tuple.
Record
A single row in a table is called record. It is also referred as tuple. It is a
collection of fields.
Column
It is collection of field values of same type.
Field
It contains data. The smallest entity of table is field.
Explanation
For Example
table STUDENT
Row
column
student_id Student_name marks
1101 abc 80
1101 Abc 80
Student_id
1101
1102
Database three tier architecture
Relational model
In relational model , each table is related to every other table in database.
There is one common field in tables which is used to relate them. Dept_no
field that relates department table and professor table.
E-R Diagram
The Entity Relationship Diagram
Explanation
Entity
An Entity represents a real world thing. For example student and class are
entities. In E-R diagram rectangle shape is used to represent entity.
Attribute
The characteristics of an entity are called attributes. Student is entity . It has
name , id , course he/she opts for are attributes.
first_name
Student
Explanation
Relationship
It describes how two entities are related to each other
Enrolls in Class
key attribute
It is the main characteristic of an entity. It is used to relate tables
student_name
student_id key attribute
Student
Student
Rules for RDBMS
Codd's twelve rules are a set of thirteen rules (numbered zero to twelve)
proposed by Edgar F. Codd, a pioneer of the relational model for databases,
designed to define what is required from a database management system in
order for it to be considered relational, i.e., a relational database management
system (RDBMS)They are sometimes referred to as "Codd's Twelve
Commandments".
A DBMS is said to be Relational Database management If it follows Codd’s
rules. Practically all rules are not followed , but RDBMS follows maximum
of he Codd’s rules
Keys in RDBMS
Primary Key
An attribute that is used to access the table data is called primary key. It must
Contain Unique values. It uniquely identifies a record in a table.
Candidate Key
It is set of attributes from which primary key is selected. One of them is made as
Primary key and rest are candidate keys. They are candidate for primary key.
It uniquely identifies a record.
Composite key
When more than one attributes are used to uniquely identify a record in a table
It becomes composite key.
Keys in RDBMS
Super Key
It is a set of attributes that uniquely identifies each record in a table. It is a
superset of candidate key.
Secondary Key
The candidate keys which are not selected as primary key , are called as
secondary key or alternate key.
SQL in RDBMS
Structure Query Language(SQL) is a programming language used for storing
and managing data in RDBMS. SQL was the first commercial language
introduced for E.F Codd's Relational model It is used to perform all types
of database operations. Almost all database use SQL as standard language
for manipulation of data. It is case sensitive language.
SQL is set of three data languages. These are
DDL - Data Definition Language. It is set of commands for defining table in
database
DCL - Data Control Language. It is set of commands used for controlling
access to database
DML - Data Manipulation Language. It is set of commands used to manipulate
table data.
Basic Data types in SQL
Char Takes Fixed length string 1 byte to 1000 bytes
Varchar Takes variable length string 1 byte to 4000 bytes
Varchar2 Takes variable length string 1 byte to 4000 bytes
Number It stores fixed and floating point
numbers
up to 38 digit
precision
Date It stores date values in dd-mm-yy
format
as required
Boolean It takes true or false value Only two values
T or F
Operators in SQL - Arithmetic
Operators in SQL – comparison
> Greater than
Checks if the value of left
operand is greater than the
value of right operand
(a > b)
< Less than
Checks if the value of left
operand is less than the value
of right operand
(a < b)
<> Not equal to Checks if are equal or not. (a <> b)
= Equal to
Checks if the values of two
operands are equal.
(a = b)
Operators in SQL - logical
ALL
The ALL operator is used to compare a value to all values in
another value set.
ANY
The ANY operator is used to compare a value to any applicable
value in the list according to the condition.
BETWEEN
The BETWEEN operator is used to search for values that are
within a set of values, given the minimum value and the
maximum value.
IN
The IN operator is used to compare a value to a list of literal
values that have been specified.
LIKE
The LIKE operator is used to compare a value to similar values
using wildcard operators.
Operators with examples
Table student
comparison operator <=
SELECT student_name , stu_id from student where marks >= 85
output –
David 1102
Student id Student
name
course marks
1101 John oca 80
1102 Rohit scjp 85
1103 Ramesh mca 82
Operators with examples
Like operator
SELECT * from student where student_name LIKE ‘r %’ ;
* means all fields.
output – 2 rows in which names begin with letter ‘r’
1102 Rohit scjp 85
1103 Ramesh mca 82
Operators with examples
AND operator – It is used to join two or more conditions. Output are the rows
That satisfy all conditions given in statement
SELECT student_id from student where marks > 80 AND student_name
LIKE ‘r%’ ;
output – we have given only one field to select i.e... Student id. Those student
ids who have name begin with ‘r’ and marks greater than 80.
1102
1103
Operators with examples
IN operator
SELECT course from student where name IN (‘ramesh’ , ‘rohit’ );
It searches rows and takes only those values of course in which name is
ramesh and rohit.
Output
Equivalently : SELECT course from student where name = ‘ramesh OR
name = ‘rohit’;
For multiple OR conditions we can use IN operator.
SCJP
MCA
RDBMS Databases
The following Databases are Relational Database Management System
MySQL
MySQL is an open source SQL database, which is developed by Swedish
company MySQL AB. MySQL supports many different platforms including
Microsoft Windows, the major Linux distributions, UNIX, and Mac OS X.
MySQL has free and paid versions , depending on its usage (non-
commercial/commercial) and features. MySQL comes with a very fast,
multi-threaded, multi-user, and robust SQL database server.
RDBMS Databases
MS SQL Server
Microsoft SQL Server is a relational database management system
developed by Microsoft. As a database server, it is a software product
with the primary function of storing and retrieving data as requested by
other software applications which may run either on the same computer
or on another computer across a network (including the Internet).
MS SQL Server is a Relational Database Management System developed by
Microsoft Inc. Its primary query languages are:
T-SQL.
ANSI SQL.
RDBMS Databases
ORACLE
It is a very large and multi-user database management system. Oracle is a
relational database management system developed by 'Oracle Corporation'.
Oracle works to efficiently manage its resource, a database of information,
among the multiple clients requesting and sending data in the network.
It is an excellent database server choice for client/server computing. Oracle
supports all major operating systems for both clients and servers, including
MSDOS, NetWare, UnixWare, OS/2 and most UNIX flavors.
The Smartpath Information Systems | BASIC RDBMS CONCEPTS

More Related Content

What's hot

Data flow diagram
Data flow diagramData flow diagram
Data flow diagram
Fizza Khan
 
Css color and background properties
Css color and background propertiesCss color and background properties
Css color and background propertiesJesus Obenita Jr.
 
XPath
XPathXPath
Structured Query Language (SQL)
Structured Query Language (SQL)Structured Query Language (SQL)
Structured Query Language (SQL)
Syed Hassan Ali
 
Data flow Diagram (DFD)
Data flow Diagram (DFD)Data flow Diagram (DFD)
Data flow Diagram (DFD)
Sarfaraz Ghanta
 
An Introduction to the DOM
An Introduction to the DOMAn Introduction to the DOM
An Introduction to the DOM
Mindy McAdams
 
Programação Estruturada 2 - Curso Completo
Programação Estruturada 2 - Curso CompletoProgramação Estruturada 2 - Curso Completo
Programação Estruturada 2 - Curso Completo
thomasdacosta
 
Php pattern matching
Php pattern matchingPhp pattern matching
Php pattern matching
JIGAR MAKHIJA
 
At00 apostila sql
At00   apostila sqlAt00   apostila sql
At00 apostila sql
Williams Gomes da Silva
 
C++ questions And Answer
C++ questions And AnswerC++ questions And Answer
C++ questions And Answer
lavparmar007
 
HTML5 audio & video
HTML5 audio & videoHTML5 audio & video
HTML5 audio & video
Hamza Zahid
 
Relational Algebra & Calculus
Relational Algebra & CalculusRelational Algebra & Calculus
Relational Algebra & Calculus
Abdullah Khosa
 
SQL
SQLSQL
jQuery PPT
jQuery PPTjQuery PPT
jQuery PPT
Dominic Arrojado
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
Amit Tyagi
 

What's hot (20)

Views, Triggers, Functions, Stored Procedures, Indexing and Joins
Views, Triggers, Functions, Stored Procedures,  Indexing and JoinsViews, Triggers, Functions, Stored Procedures,  Indexing and Joins
Views, Triggers, Functions, Stored Procedures, Indexing and Joins
 
Data flow diagram
Data flow diagramData flow diagram
Data flow diagram
 
Css color and background properties
Css color and background propertiesCss color and background properties
Css color and background properties
 
XPath
XPathXPath
XPath
 
Sql commands
Sql commandsSql commands
Sql commands
 
Structured Query Language (SQL)
Structured Query Language (SQL)Structured Query Language (SQL)
Structured Query Language (SQL)
 
Data flow Diagram (DFD)
Data flow Diagram (DFD)Data flow Diagram (DFD)
Data flow Diagram (DFD)
 
An Introduction to the DOM
An Introduction to the DOMAn Introduction to the DOM
An Introduction to the DOM
 
HTML
HTMLHTML
HTML
 
Programação Estruturada 2 - Curso Completo
Programação Estruturada 2 - Curso CompletoProgramação Estruturada 2 - Curso Completo
Programação Estruturada 2 - Curso Completo
 
Mysql
MysqlMysql
Mysql
 
Css Ppt
Css PptCss Ppt
Css Ppt
 
Php pattern matching
Php pattern matchingPhp pattern matching
Php pattern matching
 
At00 apostila sql
At00   apostila sqlAt00   apostila sql
At00 apostila sql
 
C++ questions And Answer
C++ questions And AnswerC++ questions And Answer
C++ questions And Answer
 
HTML5 audio & video
HTML5 audio & videoHTML5 audio & video
HTML5 audio & video
 
Relational Algebra & Calculus
Relational Algebra & CalculusRelational Algebra & Calculus
Relational Algebra & Calculus
 
SQL
SQLSQL
SQL
 
jQuery PPT
jQuery PPTjQuery PPT
jQuery PPT
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
 

Viewers also liked

Good Websites For Learning and Teaching
Good Websites For Learning and TeachingGood Websites For Learning and Teaching
Good Websites For Learning and Teaching
Mumbai, The Economics Club, Mumbai
 
Mysql introduction
Mysql introduction Mysql introduction
Mysql introduction
Prof. Wim Van Criekinge
 
Rdbms
RdbmsRdbms
Rdbms
rdbms
 
Introduction of programming tips site
Introduction of programming tips siteIntroduction of programming tips site
Introduction of programming tips site
Ryosuke Miyahara
 
Ppt on unemployment
Ppt on unemploymentPpt on unemployment
Ppt on unemployment
manav500
 
UX, ethnography and possibilities: for Libraries, Museums and Archives
UX, ethnography and possibilities: for Libraries, Museums and ArchivesUX, ethnography and possibilities: for Libraries, Museums and Archives
UX, ethnography and possibilities: for Libraries, Museums and Archives
Ned Potter
 

Viewers also liked (7)

Good Websites For Learning and Teaching
Good Websites For Learning and TeachingGood Websites For Learning and Teaching
Good Websites For Learning and Teaching
 
Dbms presentaion
Dbms presentaionDbms presentaion
Dbms presentaion
 
Mysql introduction
Mysql introduction Mysql introduction
Mysql introduction
 
Rdbms
RdbmsRdbms
Rdbms
 
Introduction of programming tips site
Introduction of programming tips siteIntroduction of programming tips site
Introduction of programming tips site
 
Ppt on unemployment
Ppt on unemploymentPpt on unemployment
Ppt on unemployment
 
UX, ethnography and possibilities: for Libraries, Museums and Archives
UX, ethnography and possibilities: for Libraries, Museums and ArchivesUX, ethnography and possibilities: for Libraries, Museums and Archives
UX, ethnography and possibilities: for Libraries, Museums and Archives
 

Similar to The Smartpath Information Systems | BASIC RDBMS CONCEPTS

COMPUTERS Database
COMPUTERS Database COMPUTERS Database
COMPUTERS Database
Rc Os
 
RDBMS
RDBMSRDBMS
Relational Database Management System part II
Relational Database Management System part IIRelational Database Management System part II
Relational Database Management System part II
KavithaA19
 
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
Prosanta Ghosh
 
Codds rules & keys
Codds rules & keysCodds rules & keys
Codds rules & keys
Balasingham Karthiban
 
Dbms relational model
Dbms relational modelDbms relational model
Dbms relational model
Chirag vasava
 
Database Concepts & SQL(1).pdf
Database Concepts & SQL(1).pdfDatabase Concepts & SQL(1).pdf
Database Concepts & SQL(1).pdf
rsujeet169
 
PHP - Getting good with MySQL part I
PHP - Getting good with MySQL part IPHP - Getting good with MySQL part I
PHP - Getting good with MySQL part I
Firdaus Adib
 
Oracle
OracleOracle
Oracle
argusacademy
 
Bca examination 2015 dbms
Bca examination 2015 dbmsBca examination 2015 dbms
Bca examination 2015 dbms
Anjaan Gajendra
 
E-R diagram & SQL
E-R diagram & SQLE-R diagram & SQL
E-R diagram & SQL
Abdullah Almasud
 
Relational Database.pptx
Relational Database.pptxRelational Database.pptx
Relational Database.pptx
SubhamSarkar64
 
rdbms-161216100344 (1).pdf
rdbms-161216100344 (1).pdfrdbms-161216100344 (1).pdf
rdbms-161216100344 (1).pdf
IrfanRashid36
 
Updated_rdbms-161216100344 (1).pptx
Updated_rdbms-161216100344 (1).pptxUpdated_rdbms-161216100344 (1).pptx
Updated_rdbms-161216100344 (1).pptx
THEFPS
 
Relational data model
Relational data modelRelational data model
Relational data model
SURBHI SAROHA
 
DBMS Basics
DBMS BasicsDBMS Basics
DBMS Basics
Jaipal Dhobale
 
Intro
IntroIntro
Introduction to Oracle
Introduction to OracleIntroduction to Oracle
Introduction to Oracle
Achmad Solichin
 

Similar to The Smartpath Information Systems | BASIC RDBMS CONCEPTS (20)

COMPUTERS Database
COMPUTERS Database COMPUTERS Database
COMPUTERS Database
 
RDBMS
RDBMSRDBMS
RDBMS
 
sql_data.pdf
sql_data.pdfsql_data.pdf
sql_data.pdf
 
Relational Database Management System part II
Relational Database Management System part IIRelational Database Management System part II
Relational Database Management System part II
 
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
 
Codds rules & keys
Codds rules & keysCodds rules & keys
Codds rules & keys
 
Dbms relational model
Dbms relational modelDbms relational model
Dbms relational model
 
Database Concepts & SQL(1).pdf
Database Concepts & SQL(1).pdfDatabase Concepts & SQL(1).pdf
Database Concepts & SQL(1).pdf
 
PHP - Getting good with MySQL part I
PHP - Getting good with MySQL part IPHP - Getting good with MySQL part I
PHP - Getting good with MySQL part I
 
Oracle
OracleOracle
Oracle
 
Bca examination 2015 dbms
Bca examination 2015 dbmsBca examination 2015 dbms
Bca examination 2015 dbms
 
E-R diagram & SQL
E-R diagram & SQLE-R diagram & SQL
E-R diagram & SQL
 
Relational Database.pptx
Relational Database.pptxRelational Database.pptx
Relational Database.pptx
 
rdbms-161216100344 (1).pdf
rdbms-161216100344 (1).pdfrdbms-161216100344 (1).pdf
rdbms-161216100344 (1).pdf
 
RDBMS
RDBMSRDBMS
RDBMS
 
Updated_rdbms-161216100344 (1).pptx
Updated_rdbms-161216100344 (1).pptxUpdated_rdbms-161216100344 (1).pptx
Updated_rdbms-161216100344 (1).pptx
 
Relational data model
Relational data modelRelational data model
Relational data model
 
DBMS Basics
DBMS BasicsDBMS Basics
DBMS Basics
 
Intro
IntroIntro
Intro
 
Introduction to Oracle
Introduction to OracleIntroduction to Oracle
Introduction to Oracle
 

Recently uploaded

The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Po-Chuan Chen
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 

Recently uploaded (20)

The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 

The Smartpath Information Systems | BASIC RDBMS CONCEPTS

  • 1. Prepared by The Smartpath Information Systems www.thesmartpath.in BASIC RDBMS CONCEPTS
  • 2. Index 1. what is RDBMS 2. Database concepts 3. Explanation 4. Database three tier architecture 5. Relational Model 6. E-R Diagram 7. E-R Diagram (Explanation) 8. E-R Diagram (Explanation) 9. Rules for RDBMS 10. Keys in RDBMS 11. Keys in RDBMS(continue) 12. SQL in RDBMS 13. Basic Datatypes in SQL
  • 3. Index 14. Operators in SQL - Arithmetic 15. Operators in SQL - Comparison 16. Operators in SQL - Logical 17. Operator with Examples - comparison operator 18. Operator with Examples - LIKE operator 19. Operator with Examples - AND operator 20. Operator with Examples - IN operator 21. RDBMS Databases - MYSQL 22. RDBMS Databases - MS SQL Server 23. RDBMS Databases - Oracle
  • 4. What is RDBMS RDBMS - Relational Database Management System It is database management system based on relational model , which is used to manage relational database. Relational model is organization of data in tables which are interrelated. Relational Database It is organized collection of tables. Data is stored in tables. Tables are related to each other using one or more fields. .
  • 5. Database concepts Table A table is collection of rows and columns. In RDBMS table is called Relation and rows are called as tuple. Record A single row in a table is called record. It is also referred as tuple. It is a collection of fields. Column It is collection of field values of same type. Field It contains data. The smallest entity of table is field.
  • 6. Explanation For Example table STUDENT Row column student_id Student_name marks 1101 abc 80 1101 Abc 80 Student_id 1101 1102
  • 7. Database three tier architecture
  • 8. Relational model In relational model , each table is related to every other table in database. There is one common field in tables which is used to relate them. Dept_no field that relates department table and professor table.
  • 9. E-R Diagram The Entity Relationship Diagram
  • 10. Explanation Entity An Entity represents a real world thing. For example student and class are entities. In E-R diagram rectangle shape is used to represent entity. Attribute The characteristics of an entity are called attributes. Student is entity . It has name , id , course he/she opts for are attributes. first_name Student
  • 11. Explanation Relationship It describes how two entities are related to each other Enrolls in Class key attribute It is the main characteristic of an entity. It is used to relate tables student_name student_id key attribute Student Student
  • 12. Rules for RDBMS Codd's twelve rules are a set of thirteen rules (numbered zero to twelve) proposed by Edgar F. Codd, a pioneer of the relational model for databases, designed to define what is required from a database management system in order for it to be considered relational, i.e., a relational database management system (RDBMS)They are sometimes referred to as "Codd's Twelve Commandments". A DBMS is said to be Relational Database management If it follows Codd’s rules. Practically all rules are not followed , but RDBMS follows maximum of he Codd’s rules
  • 13. Keys in RDBMS Primary Key An attribute that is used to access the table data is called primary key. It must Contain Unique values. It uniquely identifies a record in a table. Candidate Key It is set of attributes from which primary key is selected. One of them is made as Primary key and rest are candidate keys. They are candidate for primary key. It uniquely identifies a record. Composite key When more than one attributes are used to uniquely identify a record in a table It becomes composite key.
  • 14. Keys in RDBMS Super Key It is a set of attributes that uniquely identifies each record in a table. It is a superset of candidate key. Secondary Key The candidate keys which are not selected as primary key , are called as secondary key or alternate key.
  • 15. SQL in RDBMS Structure Query Language(SQL) is a programming language used for storing and managing data in RDBMS. SQL was the first commercial language introduced for E.F Codd's Relational model It is used to perform all types of database operations. Almost all database use SQL as standard language for manipulation of data. It is case sensitive language. SQL is set of three data languages. These are DDL - Data Definition Language. It is set of commands for defining table in database DCL - Data Control Language. It is set of commands used for controlling access to database DML - Data Manipulation Language. It is set of commands used to manipulate table data.
  • 16. Basic Data types in SQL Char Takes Fixed length string 1 byte to 1000 bytes Varchar Takes variable length string 1 byte to 4000 bytes Varchar2 Takes variable length string 1 byte to 4000 bytes Number It stores fixed and floating point numbers up to 38 digit precision Date It stores date values in dd-mm-yy format as required Boolean It takes true or false value Only two values T or F
  • 17. Operators in SQL - Arithmetic
  • 18. Operators in SQL – comparison > Greater than Checks if the value of left operand is greater than the value of right operand (a > b) < Less than Checks if the value of left operand is less than the value of right operand (a < b) <> Not equal to Checks if are equal or not. (a <> b) = Equal to Checks if the values of two operands are equal. (a = b)
  • 19. Operators in SQL - logical ALL The ALL operator is used to compare a value to all values in another value set. ANY The ANY operator is used to compare a value to any applicable value in the list according to the condition. BETWEEN The BETWEEN operator is used to search for values that are within a set of values, given the minimum value and the maximum value. IN The IN operator is used to compare a value to a list of literal values that have been specified. LIKE The LIKE operator is used to compare a value to similar values using wildcard operators.
  • 20. Operators with examples Table student comparison operator <= SELECT student_name , stu_id from student where marks >= 85 output – David 1102 Student id Student name course marks 1101 John oca 80 1102 Rohit scjp 85 1103 Ramesh mca 82
  • 21. Operators with examples Like operator SELECT * from student where student_name LIKE ‘r %’ ; * means all fields. output – 2 rows in which names begin with letter ‘r’ 1102 Rohit scjp 85 1103 Ramesh mca 82
  • 22. Operators with examples AND operator – It is used to join two or more conditions. Output are the rows That satisfy all conditions given in statement SELECT student_id from student where marks > 80 AND student_name LIKE ‘r%’ ; output – we have given only one field to select i.e... Student id. Those student ids who have name begin with ‘r’ and marks greater than 80. 1102 1103
  • 23. Operators with examples IN operator SELECT course from student where name IN (‘ramesh’ , ‘rohit’ ); It searches rows and takes only those values of course in which name is ramesh and rohit. Output Equivalently : SELECT course from student where name = ‘ramesh OR name = ‘rohit’; For multiple OR conditions we can use IN operator. SCJP MCA
  • 24. RDBMS Databases The following Databases are Relational Database Management System MySQL MySQL is an open source SQL database, which is developed by Swedish company MySQL AB. MySQL supports many different platforms including Microsoft Windows, the major Linux distributions, UNIX, and Mac OS X. MySQL has free and paid versions , depending on its usage (non- commercial/commercial) and features. MySQL comes with a very fast, multi-threaded, multi-user, and robust SQL database server.
  • 25. RDBMS Databases MS SQL Server Microsoft SQL Server is a relational database management system developed by Microsoft. As a database server, it is a software product with the primary function of storing and retrieving data as requested by other software applications which may run either on the same computer or on another computer across a network (including the Internet). MS SQL Server is a Relational Database Management System developed by Microsoft Inc. Its primary query languages are: T-SQL. ANSI SQL.
  • 26. RDBMS Databases ORACLE It is a very large and multi-user database management system. Oracle is a relational database management system developed by 'Oracle Corporation'. Oracle works to efficiently manage its resource, a database of information, among the multiple clients requesting and sending data in the network. It is an excellent database server choice for client/server computing. Oracle supports all major operating systems for both clients and servers, including MSDOS, NetWare, UnixWare, OS/2 and most UNIX flavors.