SlideShare una empresa de Scribd logo
1 de 42
G.NIVETHA B.Tech.,
ASSISTANT PROFESSOR
DEPARTMENT OF COMMERCE WITH COMPUTER
APPLICATION
S B K COLLEGE, ARUPPUKOTTAI
Database
management
system
Understand a DBMS and define its components.
Understand the architecture of a DBMS and its levels.
Distinguish between different database models.
Understand the concept of relational database operations
on a relation.
OBJECTIVES
Use Structured Query Language (SQL) to define simple
relations.
DATABASE
MANAGEMENT
SYSTEM
DBMS
• Database – a collection of data that is logically coherent.
• DBMS – Database Management System
– defines, creates, and maintains a database.
– Allows users controlled access to data in the database.
– A combination of 5 components:
• Hardware
• Software
• Data
• Users
• Procedures
DBMS components
 Hardware –
the physical computer system that allows physical access to data.
 Software –
the actual program that allows users to access, maintain, and update
physical data.
 Data – stored physically on the storage devices
 Users –
 End users - Normal user and DBA (Database Administrator)
 Application programs
 Procedures –
a set of rules that should be clearly defined and followed by the users.
ARCHITECTURE
Database
architecture
Architecture
• Internal level –
– Determines where data are actually stored on the storage
device.
– Low-level access method
• Conceptual level –
– Defines the logical view of the data
– The main functions of DBMS are in this level.
• External level –
– Interacts directly with the user.
– Change the data coming from the conceptual level to a
format and view that are familiar to the users.
DATABASE
MODELS
Database models
• A database model
– defines the logical design of data.
– Describes the relationships between different
parts of data.
• 3 models
– Hierarchical model
– Network model
– Relational model
Hierarchical model
 Data are organized as an upside down tree.
 Each entity has only one parent but can have
several children.
Network model
 The entities are organized in a graph.
 Some entities can be accessed through several paths.
Relational model
 Data are organized in two-dimensional tables
called relations.
 The tables are related to each other.
 The most popular model.
RELATIONAL
MODEL
14.4
Relational model
• RDBMS (Relational Database Management System)
• external view
– The data are represented as a set of relations.
– A relation is a two-dimensional table.
• This doesn’t mean that data are stored as tables;
the physical storage of the data is independent of
the way the data are logically organized.
Relation
 Name – each relation in a relational database should have a name that is
unique among other relations.
 Attribute – each column in a relation.
 The degree of the relation – the total number of attributes for a relation.
 Tuple – each row in a relation.
 The cardinality of the relation – the total number of rows in a relation.
OPERATIONS
ON
RELATIONS
Operations on relations
• In a relational database, we can define several operations to
create new relations out of the existing ones.
• Basic operations:
– Insert
– Delete
– Update
– Select
– Project
– Join
– Union
– Intersection
– Difference
Insert operation
 An unary operation.
 Insert a new tuple into the relation.
Delete operation
 An unary operation.
 Delete a tuple defined by a criterion from the relation.
Update operation
 An unary operation.
 Changes the value of some attributes of a tuple.
Select operation
 An unary operation.
 It is applied to one single relation and creates another
relation.
 The tuples in the resulting relation are a subset of the tuples
in the original relation.
 Use some criteria to select
Project operation
 An unary operation.
 It is applied to one single relation and creates another
relation.
 The attributes in the resulting relation are a subset of the
attributes in the original relation.
Join operation
 A binary operation.
 Combines two relations based on common attributes.
Union operation
 A binary operation.
 Creates a new relation in which each tuple is either in the
first relation, in the second, or in both.
 The two relations must have the same attributes.
Intersection operation
 A binary operation.
 Creates a new relation in which each tuple is a member in
both relations.
 The two relations must have the same attributes.
Difference operation
 A binary operation.
 Creates a new relation in which each tuple is in the first
relation but not the second.
 The two relations must have the same attributes.
STRUCTURED
QUERY
LANGUAGE
SQL (Structured Query Language)
• Standardized by ANSI and ISO for use on relational
databases.
• It is a declarative (not procedural) language, which
means that the users declare what they want
without having to write a step-by-step procedure.
• First implemented by Oracle in 1979.
• SQL allows you to combine the following statements
to extract more complex information from database.
Insert
• insert into RELATION-NAME
values ( … , … , … )
 insert into COURSES
values ( “CIS52”,”TCP/IP”, 6 )
Delete
• delete from RELATION-NAME
where criteria
 delete from COURSES
where No=“CIS19”
Update
• update RELATION-NAME
set attribute1=value1, attribute2=value2, …
where criteria
 update COURSES
set Unit=6
where No=“CIS51”
Select
• select *
from RELATION-NAME
where criteria
 select *
from COURSES
where Unit=5
Project
• select attribute-list
from RELATION-NAME
 select No, Unit
from COURSES
Join
• select attribute-list
from RELATION1,RELATION2
where criteria
 select No,Course-Name,Unit,Professor
from COURSES,TAUGHT-BY
where COURSES.No=TAUGHT-BY.No
Union
• select *
from RELATION1
union
select *
from RELATION2
 select *
from CIS15-Roster
union
select *
from CIS52-Roster
Intersection
• select *
from RELATION1
intersection
select *
from RELATION2
 select *
from CIS15-Roster
intersection
select *
from CIS52-Roster
Difference
• select *
from RELATION1
minus
select *
from RELATION2
 select *
from CIS15-Roster
minus
select *
from CIS52-Roster
OTHER
DATABASE
MODELS
Distributed databases
• It is not a new model. It is based on relational model.
• The data are stored on several computers that
communicate through the Internet or some private WAN.
• Data are either fragmented, with each fragment stored at
one site, or data are replicated at each site.
– Fragmented distributed databases
– Replicated distributed databases
Object-Oriented databases
• Some application like to see data as a structure
such as a record made of fields.
• Tries to keep the adv. of the relational model and
allows applications to access structured data.
• In an OODB, objects and their relations are
defined. In addition, each object can have
attributes that can be expressed as fields.

Más contenido relacionado

La actualidad más candente

The Database Environment Chapter 14
The Database Environment Chapter 14The Database Environment Chapter 14
The Database Environment Chapter 14Jeanie Arnoco
 
Week 4 The Relational Data Model & The Entity Relationship Data Model
Week 4 The Relational Data Model & The Entity Relationship Data ModelWeek 4 The Relational Data Model & The Entity Relationship Data Model
Week 4 The Relational Data Model & The Entity Relationship Data Modeloudesign
 
Relational Database Management System part II
Relational Database Management System part IIRelational Database Management System part II
Relational Database Management System part IIKavithaA19
 
Dbms relational model
Dbms relational modelDbms relational model
Dbms relational modelChirag vasava
 
Database management system chapter5
Database management system chapter5Database management system chapter5
Database management system chapter5Pranab Dasgupta
 
introduction of database in DBMS
introduction of database in DBMSintroduction of database in DBMS
introduction of database in DBMSAbhishekRajpoot8
 
Relational Database Fundamentals
Relational Database FundamentalsRelational Database Fundamentals
Relational Database FundamentalsKHALID C
 
Introduction to DBMS and SQL Overview
Introduction to DBMS and SQL OverviewIntroduction to DBMS and SQL Overview
Introduction to DBMS and SQL OverviewPrabu U
 
Dbms ii mca-ch3-er-model-2013
Dbms ii mca-ch3-er-model-2013Dbms ii mca-ch3-er-model-2013
Dbms ii mca-ch3-er-model-2013Prosanta Ghosh
 
Dbms Interview Question And Answer
Dbms Interview Question And AnswerDbms Interview Question And Answer
Dbms Interview Question And AnswerJagan Mohan Bishoyi
 

La actualidad más candente (20)

The Database Environment Chapter 14
The Database Environment Chapter 14The Database Environment Chapter 14
The Database Environment Chapter 14
 
Relational model
Relational modelRelational model
Relational model
 
Week 4 The Relational Data Model & The Entity Relationship Data Model
Week 4 The Relational Data Model & The Entity Relationship Data ModelWeek 4 The Relational Data Model & The Entity Relationship Data Model
Week 4 The Relational Data Model & The Entity Relationship Data Model
 
Relational model
Relational modelRelational model
Relational model
 
DISE - Database Concepts
DISE - Database ConceptsDISE - Database Concepts
DISE - Database Concepts
 
RDBMS concepts
RDBMS conceptsRDBMS concepts
RDBMS concepts
 
Relational Database Management System part II
Relational Database Management System part IIRelational Database Management System part II
Relational Database Management System part II
 
Dbms
DbmsDbms
Dbms
 
Rdbms
RdbmsRdbms
Rdbms
 
Denormalization
DenormalizationDenormalization
Denormalization
 
The Relational Model
The Relational ModelThe Relational Model
The Relational Model
 
Dbms relational model
Dbms relational modelDbms relational model
Dbms relational model
 
Dbms relational data model and sql queries
Dbms relational data model and sql queries Dbms relational data model and sql queries
Dbms relational data model and sql queries
 
Database management system chapter5
Database management system chapter5Database management system chapter5
Database management system chapter5
 
introduction of database in DBMS
introduction of database in DBMSintroduction of database in DBMS
introduction of database in DBMS
 
Relational Database Fundamentals
Relational Database FundamentalsRelational Database Fundamentals
Relational Database Fundamentals
 
Introduction to DBMS and SQL Overview
Introduction to DBMS and SQL OverviewIntroduction to DBMS and SQL Overview
Introduction to DBMS and SQL Overview
 
Exception & Database
Exception & DatabaseException & Database
Exception & Database
 
Dbms ii mca-ch3-er-model-2013
Dbms ii mca-ch3-er-model-2013Dbms ii mca-ch3-er-model-2013
Dbms ii mca-ch3-er-model-2013
 
Dbms Interview Question And Answer
Dbms Interview Question And AnswerDbms Interview Question And Answer
Dbms Interview Question And Answer
 

Similar a database management system

Week 2 - Database System Development Lifecycle-old.pptx
Week 2 - Database System Development Lifecycle-old.pptxWeek 2 - Database System Development Lifecycle-old.pptx
Week 2 - Database System Development Lifecycle-old.pptxNurulIzrin
 
Fundamentals of Database ppt ch02
Fundamentals of Database ppt ch02Fundamentals of Database ppt ch02
Fundamentals of Database ppt ch02Jotham Gadot
 
Unit 2_DBMS_10.2.22.pptx
Unit 2_DBMS_10.2.22.pptxUnit 2_DBMS_10.2.22.pptx
Unit 2_DBMS_10.2.22.pptxMaryJoseph79
 
Chapter – 3 Database Design P-I.pdf
Chapter – 3 Database Design P-I.pdfChapter – 3 Database Design P-I.pdf
Chapter – 3 Database Design P-I.pdfTamiratDejene1
 
Week 1 and 2 Getting started with DBMS.pptx
Week 1 and 2 Getting started with DBMS.pptxWeek 1 and 2 Getting started with DBMS.pptx
Week 1 and 2 Getting started with DBMS.pptxRiannel Tecson
 
Database management system.pptx
Database management system.pptxDatabase management system.pptx
Database management system.pptxAshmitKashyap1
 
Fundamentals of Database ppt ch04
Fundamentals of Database ppt ch04Fundamentals of Database ppt ch04
Fundamentals of Database ppt ch04Jotham Gadot
 
IT6701 Information Management - Unit I
IT6701 Information Management - Unit I  IT6701 Information Management - Unit I
IT6701 Information Management - Unit I pkaviya
 
DBMS & Data Models - In Introduction
DBMS & Data Models - In IntroductionDBMS & Data Models - In Introduction
DBMS & Data Models - In IntroductionRajeev Srivastava
 
9a797dbms chapter1 b.sc2
9a797dbms chapter1 b.sc29a797dbms chapter1 b.sc2
9a797dbms chapter1 b.sc2Mukund Trivedi
 
Chapter-2 Database System Concepts and Architecture
Chapter-2 Database System Concepts and ArchitectureChapter-2 Database System Concepts and Architecture
Chapter-2 Database System Concepts and ArchitectureKunal Anand
 
What Is Super Key In Dbms
What Is Super Key In DbmsWhat Is Super Key In Dbms
What Is Super Key In DbmsTheresa Singh
 
Chapter – 2 Data Models.pdf
Chapter – 2 Data Models.pdfChapter – 2 Data Models.pdf
Chapter – 2 Data Models.pdfTamiratDejene1
 
CBSE XII Database Concepts And MySQL Presentation
CBSE XII Database Concepts And MySQL PresentationCBSE XII Database Concepts And MySQL Presentation
CBSE XII Database Concepts And MySQL PresentationGuru Ji
 
02010 ppt ch04
02010 ppt ch0402010 ppt ch04
02010 ppt ch04ams1ams1
 

Similar a database management system (20)

Week 2 - Database System Development Lifecycle-old.pptx
Week 2 - Database System Development Lifecycle-old.pptxWeek 2 - Database System Development Lifecycle-old.pptx
Week 2 - Database System Development Lifecycle-old.pptx
 
Fundamentals of Database ppt ch02
Fundamentals of Database ppt ch02Fundamentals of Database ppt ch02
Fundamentals of Database ppt ch02
 
Unit 2_DBMS_10.2.22.pptx
Unit 2_DBMS_10.2.22.pptxUnit 2_DBMS_10.2.22.pptx
Unit 2_DBMS_10.2.22.pptx
 
Chapter – 3 Database Design P-I.pdf
Chapter – 3 Database Design P-I.pdfChapter – 3 Database Design P-I.pdf
Chapter – 3 Database Design P-I.pdf
 
Database Management System
Database Management SystemDatabase Management System
Database Management System
 
DBMS
DBMS DBMS
DBMS
 
Week 1 and 2 Getting started with DBMS.pptx
Week 1 and 2 Getting started with DBMS.pptxWeek 1 and 2 Getting started with DBMS.pptx
Week 1 and 2 Getting started with DBMS.pptx
 
Database management system.pptx
Database management system.pptxDatabase management system.pptx
Database management system.pptx
 
Fundamentals of Database ppt ch04
Fundamentals of Database ppt ch04Fundamentals of Database ppt ch04
Fundamentals of Database ppt ch04
 
oracle
oracle oracle
oracle
 
Data models
Data modelsData models
Data models
 
IT6701 Information Management - Unit I
IT6701 Information Management - Unit I  IT6701 Information Management - Unit I
IT6701 Information Management - Unit I
 
DBMS & Data Models - In Introduction
DBMS & Data Models - In IntroductionDBMS & Data Models - In Introduction
DBMS & Data Models - In Introduction
 
9a797dbms chapter1 b.sc2
9a797dbms chapter1 b.sc29a797dbms chapter1 b.sc2
9a797dbms chapter1 b.sc2
 
Chapter-2 Database System Concepts and Architecture
Chapter-2 Database System Concepts and ArchitectureChapter-2 Database System Concepts and Architecture
Chapter-2 Database System Concepts and Architecture
 
What Is Super Key In Dbms
What Is Super Key In DbmsWhat Is Super Key In Dbms
What Is Super Key In Dbms
 
Chapter – 2 Data Models.pdf
Chapter – 2 Data Models.pdfChapter – 2 Data Models.pdf
Chapter – 2 Data Models.pdf
 
CBSE XII Database Concepts And MySQL Presentation
CBSE XII Database Concepts And MySQL PresentationCBSE XII Database Concepts And MySQL Presentation
CBSE XII Database Concepts And MySQL Presentation
 
02010 ppt ch04
02010 ppt ch0402010 ppt ch04
02010 ppt ch04
 
Unit 1 DBMS
Unit 1 DBMSUnit 1 DBMS
Unit 1 DBMS
 

Último

4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
Expanded definition: technical and operational
Expanded definition: technical and operationalExpanded definition: technical and operational
Expanded definition: technical and operationalssuser3e220a
 
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptxMan or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptxDhatriParmar
 
Mental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young mindsMental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young mindsPooky Knightsmith
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSMae Pangan
 
Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research DiscourseAnita GoswamiGiri
 
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...DhatriParmar
 
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...DhatriParmar
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Projectjordimapav
 
MS4 level being good citizen -imperative- (1) (1).pdf
MS4 level   being good citizen -imperative- (1) (1).pdfMS4 level   being good citizen -imperative- (1) (1).pdf
MS4 level being good citizen -imperative- (1) (1).pdfMr Bounab Samir
 
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxkarenfajardo43
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmStan Meyer
 
Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWQuiz Club NITW
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptxmary850239
 
4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptxmary850239
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxVanesaIglesias10
 

Último (20)

4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
Expanded definition: technical and operational
Expanded definition: technical and operationalExpanded definition: technical and operational
Expanded definition: technical and operational
 
Paradigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTAParadigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTA
 
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptxMan or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
 
Mental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young mindsMental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young minds
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHS
 
Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research Discourse
 
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
 
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Project
 
MS4 level being good citizen -imperative- (1) (1).pdf
MS4 level   being good citizen -imperative- (1) (1).pdfMS4 level   being good citizen -imperative- (1) (1).pdf
MS4 level being good citizen -imperative- (1) (1).pdf
 
prashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Professionprashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Profession
 
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and Film
 
Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITW
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx
 
4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptx
 

database management system

  • 1. G.NIVETHA B.Tech., ASSISTANT PROFESSOR DEPARTMENT OF COMMERCE WITH COMPUTER APPLICATION S B K COLLEGE, ARUPPUKOTTAI
  • 3. Understand a DBMS and define its components. Understand the architecture of a DBMS and its levels. Distinguish between different database models. Understand the concept of relational database operations on a relation. OBJECTIVES Use Structured Query Language (SQL) to define simple relations.
  • 5. DBMS • Database – a collection of data that is logically coherent. • DBMS – Database Management System – defines, creates, and maintains a database. – Allows users controlled access to data in the database. – A combination of 5 components: • Hardware • Software • Data • Users • Procedures
  • 6. DBMS components  Hardware – the physical computer system that allows physical access to data.  Software – the actual program that allows users to access, maintain, and update physical data.  Data – stored physically on the storage devices  Users –  End users - Normal user and DBA (Database Administrator)  Application programs  Procedures – a set of rules that should be clearly defined and followed by the users.
  • 9. Architecture • Internal level – – Determines where data are actually stored on the storage device. – Low-level access method • Conceptual level – – Defines the logical view of the data – The main functions of DBMS are in this level. • External level – – Interacts directly with the user. – Change the data coming from the conceptual level to a format and view that are familiar to the users.
  • 11. Database models • A database model – defines the logical design of data. – Describes the relationships between different parts of data. • 3 models – Hierarchical model – Network model – Relational model
  • 12. Hierarchical model  Data are organized as an upside down tree.  Each entity has only one parent but can have several children.
  • 13. Network model  The entities are organized in a graph.  Some entities can be accessed through several paths.
  • 14. Relational model  Data are organized in two-dimensional tables called relations.  The tables are related to each other.  The most popular model.
  • 16. Relational model • RDBMS (Relational Database Management System) • external view – The data are represented as a set of relations. – A relation is a two-dimensional table. • This doesn’t mean that data are stored as tables; the physical storage of the data is independent of the way the data are logically organized.
  • 17. Relation  Name – each relation in a relational database should have a name that is unique among other relations.  Attribute – each column in a relation.  The degree of the relation – the total number of attributes for a relation.  Tuple – each row in a relation.  The cardinality of the relation – the total number of rows in a relation.
  • 19. Operations on relations • In a relational database, we can define several operations to create new relations out of the existing ones. • Basic operations: – Insert – Delete – Update – Select – Project – Join – Union – Intersection – Difference
  • 20. Insert operation  An unary operation.  Insert a new tuple into the relation.
  • 21. Delete operation  An unary operation.  Delete a tuple defined by a criterion from the relation.
  • 22. Update operation  An unary operation.  Changes the value of some attributes of a tuple.
  • 23. Select operation  An unary operation.  It is applied to one single relation and creates another relation.  The tuples in the resulting relation are a subset of the tuples in the original relation.  Use some criteria to select
  • 24. Project operation  An unary operation.  It is applied to one single relation and creates another relation.  The attributes in the resulting relation are a subset of the attributes in the original relation.
  • 25. Join operation  A binary operation.  Combines two relations based on common attributes.
  • 26. Union operation  A binary operation.  Creates a new relation in which each tuple is either in the first relation, in the second, or in both.  The two relations must have the same attributes.
  • 27. Intersection operation  A binary operation.  Creates a new relation in which each tuple is a member in both relations.  The two relations must have the same attributes.
  • 28. Difference operation  A binary operation.  Creates a new relation in which each tuple is in the first relation but not the second.  The two relations must have the same attributes.
  • 30. SQL (Structured Query Language) • Standardized by ANSI and ISO for use on relational databases. • It is a declarative (not procedural) language, which means that the users declare what they want without having to write a step-by-step procedure. • First implemented by Oracle in 1979. • SQL allows you to combine the following statements to extract more complex information from database.
  • 31. Insert • insert into RELATION-NAME values ( … , … , … )  insert into COURSES values ( “CIS52”,”TCP/IP”, 6 )
  • 32. Delete • delete from RELATION-NAME where criteria  delete from COURSES where No=“CIS19”
  • 33. Update • update RELATION-NAME set attribute1=value1, attribute2=value2, … where criteria  update COURSES set Unit=6 where No=“CIS51”
  • 34. Select • select * from RELATION-NAME where criteria  select * from COURSES where Unit=5
  • 35. Project • select attribute-list from RELATION-NAME  select No, Unit from COURSES
  • 36. Join • select attribute-list from RELATION1,RELATION2 where criteria  select No,Course-Name,Unit,Professor from COURSES,TAUGHT-BY where COURSES.No=TAUGHT-BY.No
  • 37. Union • select * from RELATION1 union select * from RELATION2  select * from CIS15-Roster union select * from CIS52-Roster
  • 38. Intersection • select * from RELATION1 intersection select * from RELATION2  select * from CIS15-Roster intersection select * from CIS52-Roster
  • 39. Difference • select * from RELATION1 minus select * from RELATION2  select * from CIS15-Roster minus select * from CIS52-Roster
  • 41. Distributed databases • It is not a new model. It is based on relational model. • The data are stored on several computers that communicate through the Internet or some private WAN. • Data are either fragmented, with each fragment stored at one site, or data are replicated at each site. – Fragmented distributed databases – Replicated distributed databases
  • 42. Object-Oriented databases • Some application like to see data as a structure such as a record made of fields. • Tries to keep the adv. of the relational model and allows applications to access structured data. • In an OODB, objects and their relations are defined. In addition, each object can have attributes that can be expressed as fields.