SlideShare a Scribd company logo
RDMS AND SQL
WHAT IS DATA ?
 Data is a collection of a distinct small
unit of information. It can be used in a
variety of forms like text, numbers, media,
bytes, etc. It can be stored in pieces of
paper or electronic memory, etc.
 Word 'Data' is originated from the word
'datum' that means 'single piece of
information.' It is plural of the word
datum.
 In computing, Data is information that can
be translated into a form for efficient
movement and processing. Data is
interchangeable.
WHAT IS DATABASE ?
The database is an organized collection of structured data to make
of books of different genres, here the library is database and books are the data.
it easily accessible, manageable and update. In
simple words, you can say, a database is a
place where the data is stored. The best
analogy is the library. The library contains a
huge collection
Database
ManagementSystem
A Database Management
System is a collection of
programs that allows users
to specify the structure of a
database, to create, query
and modify the data in the
database and to control
access to it. (e.g. limit
access to the database so
that only relevant staff can
access details of enrolling
students).
S o m e o f t h e c o m m o n u s e d D B M S s
a r e :
- O R A C L E , I B M ’ S D B 2 , M i c r o s o f t ’ s S Q L
S E R V E R , M S - A c c e s s A n d I n f o r m i x .
• S o m e o f t h e d e s k t o p b a s e d D B M S s
a r e :
- M i c r o s o f t F o x p r o , B o r l a n d D B A S E
A n d
M i c r o s o f t A c c e s s .
EXAMPLESOF DBMS
Controlling Data Redundancy : Data is recorded in
only one place in the database and it is not duplicated.
• Data Consistency : Data item appears only once, and
the updated value is immediately available to all users.
• Control Over Concurrency : In a computer file-based
system in updating, one may overwrite the values recorded by the other.
• Backup and Recovery Procedures :
automatically create the backup of data and restore data if
required.
• Data Independence : Separation of data
structure of database from application program that uses
the data is called data independence.
Cost of Hardware and Software : Processor with high speed of data
processing and memory of large size is required.
• Cost of Data Conversion : Very difficult and costly method to convert
convert data of data file into database.
• Cost of Staff Training : A lot of amount for the training of staff to run
run the DBMS.
•Appointing Technical Staff : Trained technical persons
such as database administrator, application programmers, data
programmers, data entry operators etc. are required to handle
handle the DBMS.
• Database Damage : All data is integrated into a single
database. If database is damaged due to electric failure or
or database is corrupted on the storage media, then your
valuable data may be lost forever.
Ø Banking : for transactions.
Ø Airlines : reservation and schedules.
Ø Tele communications : for retrieving data of user.
Ø Credit card : for transactions.
Ø Universities : registration, retrieving marks,
applications, grades.
Ø Human resources : employee records, salaries, tax
deductions
APPLICATIONSOF
RDMS
Relational Database Management System(RDBMS)
• • Most popular database system.
• • Simple and sound theoretical basis.
• • Developed by E F Codd in the early 1970's.
• • The model is based on tables, rows and columns and the
manipulation of data stored within.
• • Relational database is a collection of these tables.
• • First commercial system: MULTICS in 1978.
• • Has overtaken Hierarchical and Network models.
• • Main feature: Single database can be spread across
several tables.
• • Examples include: Oracle, IBM's DB2, Sybase, MySQL
& Microsoft Access.
RDBMS ADVANTAGES
• INCREASESTHE SHARINGOF DATAANDFASTERDEVELOPMENTOF NEWAPPLICATIONS.
• SUPPORTA SIMPLEDATASTRUCTURE, NAMELYTABLESOR RELATIONS.
• LIMITREDUNDANCYOR REPLICATIONOF DATA.
• BETTERINTEGRITYAS DATAINCONSISTENCIESARE AVOIDEDBY STORINGDATAIN ONEPLACE.
• PROVIDEPHYSICAL DATAINDEPENDENCESO USERSDO NOTHAVETO BE AWAREOF UNDERLYINGOBJECTS.
• OFFERLOGICAL DATABASEINDEPENDENCE - DATACANBE VIEWEDIN DIFFERENTWAYSBY DIFFERENTUSERS.
• EXPANDABILITYIS RELATIVELYEASYTO ACHIEVEBY ADDINGNEWVIEWS OF THEDATAAS THEYARE
REQUIRED.
• SUPPORTONEOFF QUERIESUSINGSQL OR OTHER APPROPRIATELANGUAGE.
• BETTERBACKUP ANDRECOVERYPROCEDURES.
• PROVIDESMULTIPLEINTERFACES.
• SOLVESMANYPROBLEMSCREATEDBY OTHERDATAMODELS.
• THEABILITYTO HANDLEEFFICIENTLYSIMPLEDATATYPES.
• MULTIPLEUSERSCANACCESSWHICHIS NOT POSSIBLEIN DBMS.
RDBMS DISADVANTAGES
•Software is expensive.
• Complex software means expensive hardware.
• Requires skilled knowledge to implement.
• Certain applications are slower processing.
• Increased vulnerability.
• More difficult to recover if data is lost.
• Seen as a poor representation of the real world.
• Difficult to represent hierarchies.
• Difficult to represent complex data type.
SCHEMA:
-LOGICAL STRUCTURE OF THE
DATABASE.
- DOESN’T SHOW THE DATA IN
DATABASE.
- CLASSIFICATION:- 1. PHYSICAL
2. CONCEPTUAL
3. EXTERNAL
Cont…
1. Physical Schema:
-Describes the physical storage of database.
-Not in terms of blocks or devices, but describes
organization of files, access path etc.
2. Conceptual Schema:
-Describes structure of whole database.
-Describes entities their relationships and
constraints.
3. External Schema:
-Provides a user’s view of data.
-Shows relevant info particular to user, hides rest
of the info.
-one or more levels.
4. Instances: Actual data contained in
database at a particular point of time.
TABLES
In Relational database model, a table is a collection of data elements organised in
terms of rows and columns. A table is also considered as a convenient representation
of relations. But a table can have duplicate row of data while a true relation cannot
have duplicate data. Table is the most simplest form of data storage.
Below is an example of an Employee table.
ES
A SINGLE ENTRY IN A TABLE IS CALLED A TUPLE OR RECORD OR ROW. A TUPLE IN A TABLE REPRESENTS A SET
OF RELATED DATA. FOR EXAMPLE, THE PREVIOUS SLIDE EMPLOYEE TABLE HAS 4 TUPLES/RECORDS/ROWS.
FOLLOWING IS AN EXAMPLE OF SINGLE RECORD OR TUPLE.
1 Adam 34 13000
FIELDS / ATTRIBUTES
A database field is a set of data values, of the same data type, in a table. It is also referred to
as a column or an attribute.
Most databases also allow fields to hold complex data like pictures, entire files, and even movie clips. A field that allows the same
data type does not mean it only has simple text values. Some databases allow the data to be stored as a file on the Operating
System, while the field data only contains a pointer or link to the actual file. This is done to keep the database size manageable, given
that smaller database sizes means less time for backups, as well as for searching data within the database.
A simple example is a table that saves employee’s job record. The fields in this table could be the following: Employee ID, Last
Name, First Name, Position, Department, and Hire Date.
Employee ID Last Name First Name Position Department Hire Date
00108 Doe John
Assistant
Manager
Human
Resources
November 16,
2000
00109 Parker Anne Supervisor
Financial
Services
May 1, 2003
WHAT ARE KEYS IN DBMS?
KEYS IN DBMS IS AN ATTRIBUTE OR SET OF ATTRIBUTES WHICH
HELPS YOU TO IDENTIFY A ROW(TUPLE) IN A RELATION(TABLE).
THEY ALLOW YOU TO FIND THE RELATION BETWEEN TWO TABLES.
KEYS HELP YOU UNIQUELY IDENTIFY A ROW IN A TABLE BY A
COMBINATION OF ONE OR MORE COLUMNS IN THAT TABLE.
DATABASE KEY IS ALSO HELPFUL FOR FINDING UNIQUE RECORD OR
ROW FROM THE TABLE.
Employee ID FirstName LastName
11 Andrew Johnson
22 Tom Wood
33 Alex Hale
PRIMARY KEY
PRIMARY KEY IS A COLUMN OR GROUP OF COLUMNS IN A TABLE THAT UNIQUELY
IDENTIFY EVERY ROW IN THAT TABLE. THE PRIMARY KEY CAN'T BE A DUPLICATE
MEANING THE SAME VALUE CAN'T APPEAR MORE THAN ONCE IN THE TABLE. A
TABLE CANNOT HAVE MORE THAN ONE PRIMARY KEY.
RULES FOR DEFINING PRIMARY KEY:
•TWO ROWS CAN'T HAVE THE SAME PRIMARY KEY VALUE.
•IT MUST FOR EVERY ROW TO HAVE A PRIMARY KEY VALUE.
•THE PRIMARY KEY FIELD CANNOT BE NULL.
•THE VALUE IN A PRIMARY KEY COLUMN CAN NEVER BE MODIFIED OR UPDATED IF
ANY FOREIGN KEY REFERS TO THAT PRIMARY KEY.
EXAMPLE OF PRIMARY KEY
INTHE FOLLOWING EXAMPLE, <CODE>STUDID</CODE> ISA PRIMARY KEY
Student ID Roll No First Name LastName Email
1 11 Tom Price abc@gmail.com
2 12 Nick Wright xyz@gmail.com
3 13 Dana Natan mno@yahoo.co
m
FOREIGN
KEY
FOREIGN KEY is a column that creates a relationship
between two tables. The purpose of Foreign keys is to
maintain data integrity and allow navigation between two
different instances of an entity. It acts as a cross-reference
between two tables as it references the primary key of
another table.
EXAMPLE OF FOREIGN
KEY
Dept. Code Dept. Name
001 Science
002 English
005 Computer
Teacher ID First name Last name
B002 David Warner
B017 Sara Joseph
B009 Mike Brunton
RDMS AND SQL
SQL
SQL (pronounced "ess-que-el") stands for Structured Query Language. SQL
is used to communicate with a database. According to ANSI (American
National Standards Institute), it is the standard language for relational
database management systems. SQL statements are used to perform tasks
such as update data on a database, or retrieve data from a database. Some
common relational database management systems that use SQL are: Oracle,
Sybase, Microsoft SQL Server, Access, Ingres, etc.
Although most database systems use SQL, most of them also have their own
additional proprietary extensions that are usually only used on their system .
However, the standard SQL commands such as "Select", "Insert", "Update",
"Delete", "Create", and "Drop" can be used to accomplish almost everything
that one needs to do with a database.
–WHENAUSERWANTSTOGETSOMEINFORMATIONFROMA
DATABASEFILE,HECAN
ISSUEAQUERY.
–AQUERYISAUSER–REQUESTTORETRIEVEDATAOR
INFORMATIONWITHACERTAIN
CONDITION.
–SQLISAQUERYLANGUAGETHATALLOWSUSERTOSPECIFYTHE
CONDITIONS.(INSTEADOF
ALGORITHMS)
Introduction
to SQL…
Concept of SQL
– The user specifies a certain condition.
– The program will go through all the records in
the database file and select those records that
satisfy the condition.(searching).
– Statistical information of the data.
– The result of the query will then be stored in
form of a table.
z
QUERIES
• At a very high level, a query is a question. When we talk about
queries in relation to other people, we expect some sort of
answer in return. This is no different for computers when we
perform database queries.
• A database query is a similar action that is most closely
associated with some sort of CRUD (create, read, update,
delete) function. A database query is a request to access data
from a database to manipulate it or retrieve it.
• This allows us to perform logic with the information we get in
response to the query. There are several different approaches to
queries, from using query strings, to writing with a query
language, or using a QBE like GraphQL or REST.
• With GraphQL, users can query for and receive only the specific
data they’re looking for; not more, not less.
EXAMPLE OF DATABASE QUERY
MADE BY – SATWIK KUMAR MEHTA

More Related Content

What's hot (19)

DOCX
Database
Nuqra Rabbani
 
PPT
RDBMS concepts
◄ vaquar khan ► ★✔
 
PDF
Unit 2 rdbms study_material
gayaramesh
 
PPTX
Basic Concept of Database
Marlon Jamera
 
PPTX
Database Concepts and Components
RIAH ENCARNACION
 
PPT
Lecture 01 introduction to database
emailharmeet
 
PPT
A short introduction to database systems.ppt
Muruly Krishan
 
PDF
Unit 4 rdbms study_material
gayaramesh
 
PPTX
Database Part 2
Fizaril Amzari Omar
 
PPTX
Intro To DataBase
DevMix
 
PDF
Unit1 rdbms study_materials
gayaramesh
 
PPT
Info systems databases
MR Z
 
ODP
Dbms
mayank78634
 
PDF
Introduction to Database
Syed Zaid Irshad
 
PPTX
Database Design
learnt
 
PPTX
Introduction to database
Arpee Callejo
 
PPT
Electronic Databases
Heather Lambert
 
PPTX
Database Part 1
Fizaril Amzari Omar
 
PPT
Database structure
Forrester High School
 
Database
Nuqra Rabbani
 
Unit 2 rdbms study_material
gayaramesh
 
Basic Concept of Database
Marlon Jamera
 
Database Concepts and Components
RIAH ENCARNACION
 
Lecture 01 introduction to database
emailharmeet
 
A short introduction to database systems.ppt
Muruly Krishan
 
Unit 4 rdbms study_material
gayaramesh
 
Database Part 2
Fizaril Amzari Omar
 
Intro To DataBase
DevMix
 
Unit1 rdbms study_materials
gayaramesh
 
Info systems databases
MR Z
 
Introduction to Database
Syed Zaid Irshad
 
Database Design
learnt
 
Introduction to database
Arpee Callejo
 
Electronic Databases
Heather Lambert
 
Database Part 1
Fizaril Amzari Omar
 
Database structure
Forrester High School
 

Similar to RDMS AND SQL (20)

PPTX
Database Management System Part-1.pptx
ArshveerSinghDhillon
 
PPT
DBMS Full.ppt
pritikanamaity600
 
PPTX
IET MySQL PPT Ver9ZESXRDCTFYVGBUHNIJOMK.pptx
chinmaygulhane747
 
PDF
03-database-management-system-revision-notes.pdf
Amit Mishra
 
PPTX
Ch 2-introduction to dbms
Rupali Rana
 
PPTX
Access
chinidhi
 
PPTX
DBMS (1).pptx
AbhijeetKumar422631
 
PDF
database1.pdf
prashanna13
 
PPTX
Chapter 7 Basic Data Storage.pptx
NiloyHasan12
 
PPTX
DATABASE-1.pptx
ManasRanjanRana4
 
PPT
Database and Database Management (DBM): Health Informatics
Zulfiquer Ahmed Amin
 
PDF
Lecture#5
TolganayAnarbekova
 
PPSX
oracle
Vilasita Nandamuri
 
PPTX
Data resource management and DSS
RajThakuri
 
PPTX
MIS-3rd Unit.pptx
ssuser5e8d69
 
PPTX
MIS-3rd Unit.pptx
Sumit Kumar
 
PPTX
IP-Lesson_Planning(Unit4 - Database concepts and SQL).pptx
ssuser61d324
 
DOC
Ms access Database
Yasir Khan
 
Database Management System Part-1.pptx
ArshveerSinghDhillon
 
DBMS Full.ppt
pritikanamaity600
 
IET MySQL PPT Ver9ZESXRDCTFYVGBUHNIJOMK.pptx
chinmaygulhane747
 
03-database-management-system-revision-notes.pdf
Amit Mishra
 
Ch 2-introduction to dbms
Rupali Rana
 
Access
chinidhi
 
DBMS (1).pptx
AbhijeetKumar422631
 
database1.pdf
prashanna13
 
Chapter 7 Basic Data Storage.pptx
NiloyHasan12
 
DATABASE-1.pptx
ManasRanjanRana4
 
Database and Database Management (DBM): Health Informatics
Zulfiquer Ahmed Amin
 
Data resource management and DSS
RajThakuri
 
MIS-3rd Unit.pptx
ssuser5e8d69
 
MIS-3rd Unit.pptx
Sumit Kumar
 
IP-Lesson_Planning(Unit4 - Database concepts and SQL).pptx
ssuser61d324
 
Ms access Database
Yasir Khan
 
Ad

Recently uploaded (20)

PDF
Generative AI: it's STILL not a robot (CIJ Summer 2025)
Paul Bradshaw
 
PDF
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
PPTX
MENINGITIS: NURSING MANAGEMENT, BACTERIAL MENINGITIS, VIRAL MENINGITIS.pptx
PRADEEP ABOTHU
 
PDF
community health nursing question paper 2.pdf
Prince kumar
 
PDF
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - GLOBAL SUCCESS - CẢ NĂM - NĂM 2024 (VOCABULARY, ...
Nguyen Thanh Tu Collection
 
PDF
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
PDF
Knee Extensor Mechanism Injuries - Orthopedic Radiologic Imaging
Sean M. Fox
 
PPTX
PATIENT ASSIGNMENTS AND NURSING CARE RESPONSIBILITIES.pptx
PRADEEP ABOTHU
 
PDF
Isharyanti-2025-Cross Language Communication in Indonesian Language
Neny Isharyanti
 
PDF
Stokey: A Jewish Village by Rachel Kolsky
History of Stoke Newington
 
PDF
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
PPTX
ASRB NET 2023 PREVIOUS YEAR QUESTION PAPER GENETICS AND PLANT BREEDING BY SAT...
Krashi Coaching
 
PPTX
How to Set Maximum Difference Odoo 18 POS
Celine George
 
PDF
DIGESTION OF CARBOHYDRATES,PROTEINS,LIPIDS
raviralanaresh2
 
PPTX
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
PPT
Talk on Critical Theory, Part One, Philosophy of Social Sciences
Soraj Hongladarom
 
PPTX
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
PPTX
SPINA BIFIDA: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
PPTX
How to Set Up Tags in Odoo 18 - Odoo Slides
Celine George
 
PPTX
How to Convert an Opportunity into a Quotation in Odoo 18 CRM
Celine George
 
Generative AI: it's STILL not a robot (CIJ Summer 2025)
Paul Bradshaw
 
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
MENINGITIS: NURSING MANAGEMENT, BACTERIAL MENINGITIS, VIRAL MENINGITIS.pptx
PRADEEP ABOTHU
 
community health nursing question paper 2.pdf
Prince kumar
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - GLOBAL SUCCESS - CẢ NĂM - NĂM 2024 (VOCABULARY, ...
Nguyen Thanh Tu Collection
 
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
Knee Extensor Mechanism Injuries - Orthopedic Radiologic Imaging
Sean M. Fox
 
PATIENT ASSIGNMENTS AND NURSING CARE RESPONSIBILITIES.pptx
PRADEEP ABOTHU
 
Isharyanti-2025-Cross Language Communication in Indonesian Language
Neny Isharyanti
 
Stokey: A Jewish Village by Rachel Kolsky
History of Stoke Newington
 
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
ASRB NET 2023 PREVIOUS YEAR QUESTION PAPER GENETICS AND PLANT BREEDING BY SAT...
Krashi Coaching
 
How to Set Maximum Difference Odoo 18 POS
Celine George
 
DIGESTION OF CARBOHYDRATES,PROTEINS,LIPIDS
raviralanaresh2
 
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
Talk on Critical Theory, Part One, Philosophy of Social Sciences
Soraj Hongladarom
 
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
SPINA BIFIDA: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
How to Set Up Tags in Odoo 18 - Odoo Slides
Celine George
 
How to Convert an Opportunity into a Quotation in Odoo 18 CRM
Celine George
 
Ad

RDMS AND SQL

  • 2. WHAT IS DATA ?  Data is a collection of a distinct small unit of information. It can be used in a variety of forms like text, numbers, media, bytes, etc. It can be stored in pieces of paper or electronic memory, etc.  Word 'Data' is originated from the word 'datum' that means 'single piece of information.' It is plural of the word datum.  In computing, Data is information that can be translated into a form for efficient movement and processing. Data is interchangeable.
  • 3. WHAT IS DATABASE ? The database is an organized collection of structured data to make of books of different genres, here the library is database and books are the data. it easily accessible, manageable and update. In simple words, you can say, a database is a place where the data is stored. The best analogy is the library. The library contains a huge collection
  • 4. Database ManagementSystem A Database Management System is a collection of programs that allows users to specify the structure of a database, to create, query and modify the data in the database and to control access to it. (e.g. limit access to the database so that only relevant staff can access details of enrolling students).
  • 5. S o m e o f t h e c o m m o n u s e d D B M S s a r e : - O R A C L E , I B M ’ S D B 2 , M i c r o s o f t ’ s S Q L S E R V E R , M S - A c c e s s A n d I n f o r m i x . • S o m e o f t h e d e s k t o p b a s e d D B M S s a r e : - M i c r o s o f t F o x p r o , B o r l a n d D B A S E A n d M i c r o s o f t A c c e s s . EXAMPLESOF DBMS
  • 6. Controlling Data Redundancy : Data is recorded in only one place in the database and it is not duplicated. • Data Consistency : Data item appears only once, and the updated value is immediately available to all users. • Control Over Concurrency : In a computer file-based system in updating, one may overwrite the values recorded by the other.
  • 7. • Backup and Recovery Procedures : automatically create the backup of data and restore data if required. • Data Independence : Separation of data structure of database from application program that uses the data is called data independence.
  • 8. Cost of Hardware and Software : Processor with high speed of data processing and memory of large size is required. • Cost of Data Conversion : Very difficult and costly method to convert convert data of data file into database. • Cost of Staff Training : A lot of amount for the training of staff to run run the DBMS.
  • 9. •Appointing Technical Staff : Trained technical persons such as database administrator, application programmers, data programmers, data entry operators etc. are required to handle handle the DBMS. • Database Damage : All data is integrated into a single database. If database is damaged due to electric failure or or database is corrupted on the storage media, then your valuable data may be lost forever.
  • 10. Ø Banking : for transactions. Ø Airlines : reservation and schedules. Ø Tele communications : for retrieving data of user. Ø Credit card : for transactions. Ø Universities : registration, retrieving marks, applications, grades. Ø Human resources : employee records, salaries, tax deductions APPLICATIONSOF RDMS
  • 11. Relational Database Management System(RDBMS) • • Most popular database system. • • Simple and sound theoretical basis. • • Developed by E F Codd in the early 1970's. • • The model is based on tables, rows and columns and the manipulation of data stored within. • • Relational database is a collection of these tables.
  • 12. • • First commercial system: MULTICS in 1978. • • Has overtaken Hierarchical and Network models. • • Main feature: Single database can be spread across several tables. • • Examples include: Oracle, IBM's DB2, Sybase, MySQL & Microsoft Access.
  • 13. RDBMS ADVANTAGES • INCREASESTHE SHARINGOF DATAANDFASTERDEVELOPMENTOF NEWAPPLICATIONS. • SUPPORTA SIMPLEDATASTRUCTURE, NAMELYTABLESOR RELATIONS. • LIMITREDUNDANCYOR REPLICATIONOF DATA. • BETTERINTEGRITYAS DATAINCONSISTENCIESARE AVOIDEDBY STORINGDATAIN ONEPLACE. • PROVIDEPHYSICAL DATAINDEPENDENCESO USERSDO NOTHAVETO BE AWAREOF UNDERLYINGOBJECTS. • OFFERLOGICAL DATABASEINDEPENDENCE - DATACANBE VIEWEDIN DIFFERENTWAYSBY DIFFERENTUSERS.
  • 14. • EXPANDABILITYIS RELATIVELYEASYTO ACHIEVEBY ADDINGNEWVIEWS OF THEDATAAS THEYARE REQUIRED. • SUPPORTONEOFF QUERIESUSINGSQL OR OTHER APPROPRIATELANGUAGE. • BETTERBACKUP ANDRECOVERYPROCEDURES. • PROVIDESMULTIPLEINTERFACES. • SOLVESMANYPROBLEMSCREATEDBY OTHERDATAMODELS. • THEABILITYTO HANDLEEFFICIENTLYSIMPLEDATATYPES. • MULTIPLEUSERSCANACCESSWHICHIS NOT POSSIBLEIN DBMS.
  • 15. RDBMS DISADVANTAGES •Software is expensive. • Complex software means expensive hardware. • Requires skilled knowledge to implement. • Certain applications are slower processing. • Increased vulnerability. • More difficult to recover if data is lost. • Seen as a poor representation of the real world. • Difficult to represent hierarchies. • Difficult to represent complex data type.
  • 16. SCHEMA: -LOGICAL STRUCTURE OF THE DATABASE. - DOESN’T SHOW THE DATA IN DATABASE. - CLASSIFICATION:- 1. PHYSICAL 2. CONCEPTUAL 3. EXTERNAL
  • 17. Cont… 1. Physical Schema: -Describes the physical storage of database. -Not in terms of blocks or devices, but describes organization of files, access path etc. 2. Conceptual Schema: -Describes structure of whole database. -Describes entities their relationships and constraints. 3. External Schema: -Provides a user’s view of data. -Shows relevant info particular to user, hides rest of the info. -one or more levels. 4. Instances: Actual data contained in database at a particular point of time.
  • 18. TABLES In Relational database model, a table is a collection of data elements organised in terms of rows and columns. A table is also considered as a convenient representation of relations. But a table can have duplicate row of data while a true relation cannot have duplicate data. Table is the most simplest form of data storage. Below is an example of an Employee table.
  • 19. ES A SINGLE ENTRY IN A TABLE IS CALLED A TUPLE OR RECORD OR ROW. A TUPLE IN A TABLE REPRESENTS A SET OF RELATED DATA. FOR EXAMPLE, THE PREVIOUS SLIDE EMPLOYEE TABLE HAS 4 TUPLES/RECORDS/ROWS. FOLLOWING IS AN EXAMPLE OF SINGLE RECORD OR TUPLE. 1 Adam 34 13000
  • 20. FIELDS / ATTRIBUTES A database field is a set of data values, of the same data type, in a table. It is also referred to as a column or an attribute. Most databases also allow fields to hold complex data like pictures, entire files, and even movie clips. A field that allows the same data type does not mean it only has simple text values. Some databases allow the data to be stored as a file on the Operating System, while the field data only contains a pointer or link to the actual file. This is done to keep the database size manageable, given that smaller database sizes means less time for backups, as well as for searching data within the database. A simple example is a table that saves employee’s job record. The fields in this table could be the following: Employee ID, Last Name, First Name, Position, Department, and Hire Date. Employee ID Last Name First Name Position Department Hire Date 00108 Doe John Assistant Manager Human Resources November 16, 2000 00109 Parker Anne Supervisor Financial Services May 1, 2003
  • 21. WHAT ARE KEYS IN DBMS? KEYS IN DBMS IS AN ATTRIBUTE OR SET OF ATTRIBUTES WHICH HELPS YOU TO IDENTIFY A ROW(TUPLE) IN A RELATION(TABLE). THEY ALLOW YOU TO FIND THE RELATION BETWEEN TWO TABLES. KEYS HELP YOU UNIQUELY IDENTIFY A ROW IN A TABLE BY A COMBINATION OF ONE OR MORE COLUMNS IN THAT TABLE. DATABASE KEY IS ALSO HELPFUL FOR FINDING UNIQUE RECORD OR ROW FROM THE TABLE. Employee ID FirstName LastName 11 Andrew Johnson 22 Tom Wood 33 Alex Hale
  • 22. PRIMARY KEY PRIMARY KEY IS A COLUMN OR GROUP OF COLUMNS IN A TABLE THAT UNIQUELY IDENTIFY EVERY ROW IN THAT TABLE. THE PRIMARY KEY CAN'T BE A DUPLICATE MEANING THE SAME VALUE CAN'T APPEAR MORE THAN ONCE IN THE TABLE. A TABLE CANNOT HAVE MORE THAN ONE PRIMARY KEY. RULES FOR DEFINING PRIMARY KEY: •TWO ROWS CAN'T HAVE THE SAME PRIMARY KEY VALUE. •IT MUST FOR EVERY ROW TO HAVE A PRIMARY KEY VALUE. •THE PRIMARY KEY FIELD CANNOT BE NULL. •THE VALUE IN A PRIMARY KEY COLUMN CAN NEVER BE MODIFIED OR UPDATED IF ANY FOREIGN KEY REFERS TO THAT PRIMARY KEY.
  • 23. EXAMPLE OF PRIMARY KEY INTHE FOLLOWING EXAMPLE, <CODE>STUDID</CODE> ISA PRIMARY KEY Student ID Roll No First Name LastName Email 1 11 Tom Price [email protected] 2 12 Nick Wright [email protected] 3 13 Dana Natan [email protected] m
  • 24. FOREIGN KEY FOREIGN KEY is a column that creates a relationship between two tables. The purpose of Foreign keys is to maintain data integrity and allow navigation between two different instances of an entity. It acts as a cross-reference between two tables as it references the primary key of another table.
  • 25. EXAMPLE OF FOREIGN KEY Dept. Code Dept. Name 001 Science 002 English 005 Computer Teacher ID First name Last name B002 David Warner B017 Sara Joseph B009 Mike Brunton
  • 27. SQL SQL (pronounced "ess-que-el") stands for Structured Query Language. SQL is used to communicate with a database. According to ANSI (American National Standards Institute), it is the standard language for relational database management systems. SQL statements are used to perform tasks such as update data on a database, or retrieve data from a database. Some common relational database management systems that use SQL are: Oracle, Sybase, Microsoft SQL Server, Access, Ingres, etc.
  • 28. Although most database systems use SQL, most of them also have their own additional proprietary extensions that are usually only used on their system . However, the standard SQL commands such as "Select", "Insert", "Update", "Delete", "Create", and "Drop" can be used to accomplish almost everything that one needs to do with a database.
  • 30. Introduction to SQL… Concept of SQL – The user specifies a certain condition. – The program will go through all the records in the database file and select those records that satisfy the condition.(searching). – Statistical information of the data. – The result of the query will then be stored in form of a table.
  • 31. z
  • 32. QUERIES • At a very high level, a query is a question. When we talk about queries in relation to other people, we expect some sort of answer in return. This is no different for computers when we perform database queries. • A database query is a similar action that is most closely associated with some sort of CRUD (create, read, update, delete) function. A database query is a request to access data from a database to manipulate it or retrieve it.
  • 33. • This allows us to perform logic with the information we get in response to the query. There are several different approaches to queries, from using query strings, to writing with a query language, or using a QBE like GraphQL or REST. • With GraphQL, users can query for and receive only the specific data they’re looking for; not more, not less.
  • 35. MADE BY – SATWIK KUMAR MEHTA