SlideShare uma empresa Scribd logo
1 de 39
UNIT - 1
INTRODUCTION
By: Ms. SWETA SINGH
Assistant Professor(CSE)
What is Database?
• The database is a collection of inter-related data
which is used to retrieve, insert and delete the
data efficiently. It is also used to organize the data
in the form of a table, schema, views, and
reports, etc.
• For example: The college Database organizes the
data about the admin, staff, students and faculty
etc.
• Using the database, you can easily retrieve,
insert, and delete the information.
Database Management System
• Database management system is a software which is used to manage the
database. For example: MySQL, Oracle, etc are a very popular commercial
database which is used in different applications.
• DBMS provides an interface to perform various operations like database creation,
storing data in it, updating data, creating a table in the database and a lot more.
• It provides protection and security to the database. In the case of multiple users, it
also maintains data consistency.
• DBMS allows users the following tasks:
• Data Definition: It is used for creation, modification, and removal of definition that
defines the organization of data in the database.
• Data Updation: It is used for the insertion, modification, and deletion of the actual
data in the database.
• Data Retrieval: It is used to retrieve the data from the database which can be used
by applications for various purposes.
• User Administration: It is used for registering and monitoring users, maintain data
integrity, enforcing data security, dealing with concurrency control, monitoring
performance and recovering information corrupted by unexpected failure.
Characteristics of DBMS
• It uses a digital repository established on a server to store
and manage the information.
• It can provide a clear and logical view of the process that
manipulates data.
• DBMS contains automatic backup and recovery procedures.
• It contains ACID properties which maintain data in a
healthy state in case of failure.
• It can reduce the complex relationship between data.
• It is used to support manipulation and processing of data.
• It is used to provide security of data.
• It can view the database from different viewpoints
according to the requirements of the user.
Advantages of DBMS
• Controls database redundancy: It can control data redundancy
because it stores all the data in one single database file and that
recorded data is placed in the database.
• Data sharing: In DBMS, the authorized users of an organization can
share the data among multiple users.
• Easily Maintenance: It can be easily maintainable due to the
centralized nature of the database system.
• Reduce time: It reduces development time and maintenance need.
• Backup: It provides backup and recovery subsystems which create
automatic backup of data from hardware and software failures and
restores the data if required.
• Multiple user interface: It provides different types of user
interfaces like graphical user interfaces, application program
interfaces
Disadvantages of DBMS
• Cost of Hardware and Software: It requires a high
speed of data processor and large memory size to run
DBMS software.
• Size: It occupies a large space of disks and large
memory to run them efficiently.
• Complexity: Database system creates additional
complexity and requirements.
• Higher impact of failure: Failure is highly impacted the
database because in most of the organization, all the
data stored in a single database and if the database is
damaged due to electric failure or database corruption
then the data may be lost forever.
DBMS Architecture
• The DBMS design depends upon its architecture.
The basic client/server architecture is used to
deal with a large number of PCs, web servers,
database servers and other components that are
connected with networks.
• The client/server architecture consists of many
PCs and a workstation which are connected via
the network.
• DBMS architecture depends upon how users are
connected to the database to get their request
done.
Types of DBMS Architecture
Types of DBMS Architecture
 1-Tier Architecture
• In this architecture, the database is directly available to the user. It means the user
can directly sit on the DBMS and uses it.
• Any changes done here will directly be done on the database itself. It doesn't
provide a handy tool for end users.
• The 1-Tier architecture is used for development of the local application, where
programmers can directly communicate with the database for the quick response.
 2-Tier Architecture
• The 2-Tier architecture is same as basic client-server. In the two-tier architecture,
applications on the client end can directly communicate with the database at the
server side. For this interaction, API's like: ODBC, JDBC are used.
• The user interfaces and application programs are run on the client-side.
• The server side is responsible to provide the functionalities like: query processing
and transaction management.
• To communicate with the DBMS, client-side application establishes a connection
with the server side.
2-Tier Architecture
3-Tier Architecture
• The 3-Tier architecture contains another layer between
the client and server. In this architecture, client can't
directly communicate with the server.
• The application on the client-end interacts with an
application server which further communicates with
the database system.
• End user has no idea about the existence of the
database beyond the application server. The database
also has no idea about any other user beyond the
application.
• The 3-Tier architecture is used in case of large web
application.
3-Tier Architecture
Three schema Architecture
• The three schema architecture is also called
ANSI/SPARC architecture or three-level
architecture.
• This framework is used to describe the structure
of a specific database system.
• The three schema architecture is also used to
separate the user applications and physical
database.
• The three schema architecture contains three-
levels. It breaks the database down into three
different categories.
Three schema Architecture
Data Models
• Data Model is the modeling of the data description, data semantics, and
consistency constraints of the data.
• It provides the conceptual tools for describing the design of a database at
each level of data abstraction
Data Models
• 1) Relational Data Model: This type of model designs
the data in the form of rows and columns within a
table. Thus, a relational model uses tables for
representing data and in-between relationships. Tables
are also called relations. This model was initially
described by Edgar F. Codd, in 1969.
• 2) Entity-Relationship Data Model: An ER model is the
logical representation of data as objects and
relationships among them. These objects are known as
entities, and relationship is an association among these
entities. This model was designed by Peter Chen and
published in 1976 papers. It was widely used in
database designing.
• 3) Object-based Data Model: An extension of the ER model
with notions of functions, encapsulation, and object
identity, as well. This model supports a rich type system
that includes structured and collection types. Thus, in
1980s, various database systems following the object-
oriented approach were developed. Here, the objects are
nothing but the data carrying its properties.
• 4) Semistructured Data Model: This type of data model is
different from the other three data models (explained
above). The semistructured data model allows the data
specifications at places where the individual data items of
the same type may have different attributes sets.
Data model Schema and Instance
• The data which is stored in the database at a particular moment of
time is called an instance of the database.
• The overall design of a database is called schema.
• A database schema is the skeleton structure of the database. It
represents the logical view of the entire database.
• A schema contains schema objects like table, foreign key, primary
key, views, columns, data types, stored procedure, etc.
• A database schema can be represented by using the visual diagram.
That diagram shows the database objects and relationship with
each other.
• A database schema is designed by the database designers to help
programmers whose software will interact with the database. The
process of database creation is called data modeling.
Data Independence
• Data independence can be explained using the three-schema architecture.
• Data independence refers characteristic of being able to modify the schema at one level of
the database system without altering the schema at the next higher level.
• There are two types of data independence:
1. Logical Data Independence
• Logical data independence refers characteristic of being able to change the conceptual
schema without having to change the external schema.
• Logical data independence is used to separate the external level from the conceptual view.
• If we do any changes in the conceptual view of the data, then the user view of the data
would not be affected.
• Logical data independence occurs at the user interface level.
2. Physical Data Independence
• Physical data independence can be defined as the capacity to change the internal schema
without having to change the conceptual schema.
• If we do any changes in the storage size of the database system server, then the Conceptual
structure of the database will not be affected.
• Physical data independence is used to separate conceptual levels from the internal levels.
• Physical data independence occurs at the logical interface level.
Data Independence
Database Language
• A DBMS has appropriate languages and interfaces to express
database queries and updates.
• Database languages can be used to read, store and update the
data in the database.
• Types of Database Language
Keys
• Keys play an important role in the relational database.
• It is used to uniquely identify any record or row of data from the table. It is
also used to establish and identify relationships between tables.
• For example: In Student table, ID is used as a key because it is unique for
each student. In PERSON table, passport_number, license_number, SSN
are keys since they are unique for each person.
•
Types of key:
1. Primary key
•It is the first key which is used to identify one and only one instance of an entity
uniquely. An entity can contain multiple keys as we saw in PERSON table. The key
which is most suitable from those lists become a primary key.
•In the EMPLOYEE table, ID can be primary key since it is unique for each employee.
In the EMPLOYEE table, we can even select License_Number and Passport_Number as
primary key since they are also unique.
•For each entity, selection of the primary key is based on requirement and
developers.
2. Candidate key
• A candidate key is an attribute or set of an attribute which can uniquely
identify a tuple.
• The remaining attributes except for primary key are considered as a
candidate key. The candidate keys are as strong as the primary key.
• For example: In the EMPLOYEE table, id is best suited for the primary key.
Rest of the attributes like SSN, Passport_Number, and License_Number,
etc. are considered as a candidate key.
3. Super Key
• Super key is a set of an attribute which can uniquely
identify a tuple. Super key is a superset of a
candidate key.
• For example: In the above EMPLOYEE table,
for(EMPLOEE_ID, EMPLOYEE_NAME) the name of
two employees can be the same, but their
EMPLYEE_ID can't be the same. Hence, this
combination can also be a key.
• The super key would be EMPLOYEE-ID,
(EMPLOYEE_ID, EMPLOYEE-NAME), etc.
4. Foreign key
• Foreign keys are the column of the table which is used to point to the primary key of another table.
• In a company, every employee works in a specific department, and employee and department are two
different entities. So we can't store the information of the department in the employee table. That's why
we link these two tables through the primary key of one table.
• We add the primary key of the DEPARTMENT table, Department_Id as a new attribute in the EMPLOYEE
table.
• Now in the EMPLOYEE table, Department_Id is the foreign key, and both the tables are related.
Generalization
• Generalization is like a bottom-up approach in which two or more entities
of lower level combine to form a higher level entity if they have some
attributes in common.
• In generalization, an entity of a higher level can also combine with the
entities of the lower level to form a further higher level entity.
• Generalization is more like subclass and superclass system, but the only
difference is the approach. Generalization uses the bottom-up approach.
Specialization
• Specialization is a top-down approach, and it is opposite to Generalization. In
specialization, one higher level entity can be broken down into two lower level
entities.
• Specialization is used to identify the subset of an entity set that shares some
distinguishing characteristics.
• Normally, the superclass is defined first, the subclass and its related attributes are
defined next, and relationship set are then added.
• For example: In an Employee management system, EMPLOYEE entity can be
specialized as TESTER or DEVELOPER based on what role they play in the company.
•
Aggregation
• In aggregation, the relation between two entities is treated as a single entity. In
aggregation, relationship with its corresponding entities is aggregated into a higher
level entity.
• For example: Center entity offers the Course entity act as a single entity in the
relationship which is in a relationship with another entity visitor. In the real world,
if a visitor visits a coaching center then he will never enquiry about the Course
only or just about the Center instead he will ask the enquiry about both.
Reduction of ER diagram to Table
• The database can be represented using the notations, and these notations can be
reduced to a collection of tables.
• In the database, every entity set or relationship set can be represented in tabular
form.The ER diagram is given below:
Structure of Database Management System
• Defining the information.
• Storing the information.
• Manipulating the information.
• Protecting the information from system crashes or data
theft.
• Differentiating access permissions for different users.
The database system is divided into three components:
Query Processor, Storage Manager, and Disk Storage.
These are explained as following below.
1. Query Processor :
•
It interprets the requests (queries) received from end user via an application program into
instructions. It also executes the user request which is received from the DML compiler.
Query Processor contains the following components –
• DML Compiler –
It processes the DML statements into low level instruction (machine language), so that they
can be executed.
• DDL Interpreter –
It processes the DDL statements into a set of table containing meta data (data about data).
• Embedded DML Pre-compiler –
It processes DML statements embedded in an application program into procedural calls.
• Query Optimizer –
It executes the instruction generated by DML Compiler.
2. Storage Manager :
• Storage Manager is a program that provides an interface between the data
stored in the database and the queries received.
• It is also known as Database Control System.
• It maintains the consistency and integrity of the database by applying the
constraints and executes the DCL statements.
• It is responsible for updating, storing, deleting, and retrieving data in the
database.
It contains the following components –
• Authorization Manager –
It ensures role-based access control, i.e,. checks whether the particular person is
privileged to perform the requested operation or not.
• Integrity Manager –
It checks the integrity constraints when the database is modified.
2. Storage Manager :
• Transaction Manager –
It controls concurrent access by performing the operations
in a scheduled way that it receives the transaction. Thus, it
ensures that the database remains in the consistent state
before and after the execution of a transaction.
• File Manager –
It manages the file space and the data structure used to
represent information in the database.
• Buffer Manager –
It is responsible for cache memory and the transfer of data
between the secondary storage and main memory.
3. Disk Storage :
•
It contains the following components –
• Data Files –
It stores the data.
• Data Dictionary –
It contains the information about the structure of any database object. It
is the repository of information that governs the metadata.
• Indices –
It provides faster retrieval of data item.
•
Extended Entity-Relationship (EE-R) Model
• EER is a high-level data model that incorporates the extensions to
the original ER model. Enhanced ERD are high level models that
represent the requirements and complexities of complex database.
• In addition to ER model concepts EE-R includes −
• Subclasses and Super classes.
• Specialization and Generalization.
• Category or union type.
• Aggregation.
• These concepts are used to create EE-R diagrams.
• Subclasses and Super class
• Super class is an entity that can be divided into further subtype.
Extended Entity-Relationship (EE-R) Model
Super class shape has sub groups: Triangle, Square and Circle.
Sub classes are the group of entities with some unique attributes.Sub class
inherits the properties and attributes from super class.
•THANK
YOU

Mais conteúdo relacionado

Mais procurados

Kskv kutch university DBMS unit 1 basic concepts, data,information,database,...
Kskv kutch university DBMS unit 1  basic concepts, data,information,database,...Kskv kutch university DBMS unit 1  basic concepts, data,information,database,...
Kskv kutch university DBMS unit 1 basic concepts, data,information,database,...Dipen Parmar
 
Week 3 Classification of Database Management Systems & Data Modeling
Week 3 Classification of Database Management Systems & Data ModelingWeek 3 Classification of Database Management Systems & Data Modeling
Week 3 Classification of Database Management Systems & Data Modelingoudesign
 
All data models in dbms
All data models in dbmsAll data models in dbms
All data models in dbmsNaresh Kumar
 
Database Concept by Luke Lonergan
Database Concept by Luke LonerganDatabase Concept by Luke Lonergan
Database Concept by Luke LonerganLuke Lonergan
 
Data Models In Database Management System
Data Models In Database Management SystemData Models In Database Management System
Data Models In Database Management SystemAmad Ahmad
 
overview of database concept
overview of database conceptoverview of database concept
overview of database conceptgourav kottawar
 
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
Relational Database Management SystemRelational Database Management System
Relational Database Management SystemMian Abdul Raheem
 
Database models unit 1 part 2
Database models unit 1  part 2Database models unit 1  part 2
Database models unit 1 part 2Ram Paliwal
 
DBMS & Data Models - In Introduction
DBMS & Data Models - In IntroductionDBMS & Data Models - In Introduction
DBMS & Data Models - In IntroductionRajeev Srivastava
 
Mca ii-dbms- u-ii-the relational database model
Mca ii-dbms- u-ii-the relational database modelMca ii-dbms- u-ii-the relational database model
Mca ii-dbms- u-ii-the relational database modelRai University
 
Utsav Mahendra : Introduction to Database and managemnet
Utsav Mahendra : Introduction to Database and managemnetUtsav Mahendra : Introduction to Database and managemnet
Utsav Mahendra : Introduction to Database and managemnetUtsav Mahendra
 
Database Concepts and Components
Database Concepts and ComponentsDatabase Concepts and Components
Database Concepts and ComponentsRIAH ENCARNACION
 
Relational Database Design
Relational Database DesignRelational Database Design
Relational Database DesignArchit Saxena
 
DBMS languages/ Types of SQL Commands
DBMS languages/ Types of SQL CommandsDBMS languages/ Types of SQL Commands
DBMS languages/ Types of SQL CommandsBHARATH KUMAR
 
Introduction to Database Management Systems (DBMS)
Introduction to Database Management Systems (DBMS)Introduction to Database Management Systems (DBMS)
Introduction to Database Management Systems (DBMS)Vijayananda Ratnam Ch
 

Mais procurados (20)

Kskv kutch university DBMS unit 1 basic concepts, data,information,database,...
Kskv kutch university DBMS unit 1  basic concepts, data,information,database,...Kskv kutch university DBMS unit 1  basic concepts, data,information,database,...
Kskv kutch university DBMS unit 1 basic concepts, data,information,database,...
 
Week 3 Classification of Database Management Systems & Data Modeling
Week 3 Classification of Database Management Systems & Data ModelingWeek 3 Classification of Database Management Systems & Data Modeling
Week 3 Classification of Database Management Systems & Data Modeling
 
All data models in dbms
All data models in dbmsAll data models in dbms
All data models in dbms
 
Database Concept by Luke Lonergan
Database Concept by Luke LonerganDatabase Concept by Luke Lonergan
Database Concept by Luke Lonergan
 
Data Models In Database Management System
Data Models In Database Management SystemData Models In Database Management System
Data Models In Database Management System
 
RDBMS
RDBMSRDBMS
RDBMS
 
overview of database concept
overview of database conceptoverview of database concept
overview of database concept
 
Dbms database models
Dbms database modelsDbms database models
Dbms database models
 
DBMS and its Models
DBMS and its ModelsDBMS and its Models
DBMS and its Models
 
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 Database Management System
Relational Database Management SystemRelational Database Management System
Relational Database Management System
 
Database models unit 1 part 2
Database models unit 1  part 2Database models unit 1  part 2
Database models unit 1 part 2
 
DBMS & Data Models - In Introduction
DBMS & Data Models - In IntroductionDBMS & Data Models - In Introduction
DBMS & Data Models - In Introduction
 
Mca ii-dbms- u-ii-the relational database model
Mca ii-dbms- u-ii-the relational database modelMca ii-dbms- u-ii-the relational database model
Mca ii-dbms- u-ii-the relational database model
 
Utsav Mahendra : Introduction to Database and managemnet
Utsav Mahendra : Introduction to Database and managemnetUtsav Mahendra : Introduction to Database and managemnet
Utsav Mahendra : Introduction to Database and managemnet
 
Database Concepts and Components
Database Concepts and ComponentsDatabase Concepts and Components
Database Concepts and Components
 
Relational Database Design
Relational Database DesignRelational Database Design
Relational Database Design
 
DBMS OF DATA MODEL Deepika 2
DBMS OF DATA MODEL  Deepika 2DBMS OF DATA MODEL  Deepika 2
DBMS OF DATA MODEL Deepika 2
 
DBMS languages/ Types of SQL Commands
DBMS languages/ Types of SQL CommandsDBMS languages/ Types of SQL Commands
DBMS languages/ Types of SQL Commands
 
Introduction to Database Management Systems (DBMS)
Introduction to Database Management Systems (DBMS)Introduction to Database Management Systems (DBMS)
Introduction to Database Management Systems (DBMS)
 

Semelhante a Unit 1 dbms

CHAPTER 1 Database system architecture.pptx
CHAPTER 1 Database system architecture.pptxCHAPTER 1 Database system architecture.pptx
CHAPTER 1 Database system architecture.pptxkashishy2
 
Database Management Systems
Database Management SystemsDatabase Management Systems
Database Management SystemsSURBHI SAROHA
 
01-database-management.pptx
01-database-management.pptx01-database-management.pptx
01-database-management.pptxdhanajimirajkar1
 
Module 1 - Chapter 2.pptx
Module 1 - Chapter 2.pptxModule 1 - Chapter 2.pptx
Module 1 - Chapter 2.pptxSoniaDevi15
 
9a797dbms chapter1 b.sc2
9a797dbms chapter1 b.sc29a797dbms chapter1 b.sc2
9a797dbms chapter1 b.sc2Mukund Trivedi
 
Database management system.pptx
Database management system.pptxDatabase management system.pptx
Database management system.pptxAshmitKashyap1
 
CST204 DBMS Module-1
CST204 DBMS Module-1CST204 DBMS Module-1
CST204 DBMS Module-1Jyothis Menon
 
Database management system lecture notes
Database management system lecture notesDatabase management system lecture notes
Database management system lecture notesUTSAHSINGH2
 
CP 121_2.pptx about time to be implement
CP 121_2.pptx about time to be implementCP 121_2.pptx about time to be implement
CP 121_2.pptx about time to be implementflyinimohamed
 
Presentation on Database management system
Presentation on Database management systemPresentation on Database management system
Presentation on Database management systemPrerana Bhattarai
 

Semelhante a Unit 1 dbms (20)

Unit 1.pptx
Unit 1.pptxUnit 1.pptx
Unit 1.pptx
 
Ch1_Intro-95(1).ppt
Ch1_Intro-95(1).pptCh1_Intro-95(1).ppt
Ch1_Intro-95(1).ppt
 
CHAPTER 1 Database system architecture.pptx
CHAPTER 1 Database system architecture.pptxCHAPTER 1 Database system architecture.pptx
CHAPTER 1 Database system architecture.pptx
 
Database Management Systems
Database Management SystemsDatabase Management Systems
Database Management Systems
 
DBMS.pptx
DBMS.pptxDBMS.pptx
DBMS.pptx
 
2.pptx
2.pptx2.pptx
2.pptx
 
01-database-management.pptx
01-database-management.pptx01-database-management.pptx
01-database-management.pptx
 
Introduction to RDBMS
Introduction to RDBMSIntroduction to RDBMS
Introduction to RDBMS
 
Module 1 - Chapter 2.pptx
Module 1 - Chapter 2.pptxModule 1 - Chapter 2.pptx
Module 1 - Chapter 2.pptx
 
9a797dbms chapter1 b.sc2
9a797dbms chapter1 b.sc29a797dbms chapter1 b.sc2
9a797dbms chapter1 b.sc2
 
unit 1.pdf
unit 1.pdfunit 1.pdf
unit 1.pdf
 
Lecture 1 =Unit 1 Part 1.ppt
Lecture 1 =Unit 1 Part 1.pptLecture 1 =Unit 1 Part 1.ppt
Lecture 1 =Unit 1 Part 1.ppt
 
Unit1 DBMS Introduction
Unit1 DBMS IntroductionUnit1 DBMS Introduction
Unit1 DBMS Introduction
 
Database Management System
Database Management SystemDatabase Management System
Database Management System
 
Database management system.pptx
Database management system.pptxDatabase management system.pptx
Database management system.pptx
 
DBMS-Unit-1.pptx
DBMS-Unit-1.pptxDBMS-Unit-1.pptx
DBMS-Unit-1.pptx
 
CST204 DBMS Module-1
CST204 DBMS Module-1CST204 DBMS Module-1
CST204 DBMS Module-1
 
Database management system lecture notes
Database management system lecture notesDatabase management system lecture notes
Database management system lecture notes
 
CP 121_2.pptx about time to be implement
CP 121_2.pptx about time to be implementCP 121_2.pptx about time to be implement
CP 121_2.pptx about time to be implement
 
Presentation on Database management system
Presentation on Database management systemPresentation on Database management system
Presentation on Database management system
 

Mais de Sweta Singh

Mais de Sweta Singh (8)

Unit 5 dbms
Unit 5 dbmsUnit 5 dbms
Unit 5 dbms
 
Unit 3 dbms
Unit 3 dbmsUnit 3 dbms
Unit 3 dbms
 
Unit 4 dbms
Unit 4 dbmsUnit 4 dbms
Unit 4 dbms
 
Unit 5 dsuc
Unit 5 dsucUnit 5 dsuc
Unit 5 dsuc
 
Unit 4 dsuc
Unit 4 dsucUnit 4 dsuc
Unit 4 dsuc
 
Unit 3 dsuc
Unit 3 dsucUnit 3 dsuc
Unit 3 dsuc
 
Unit 2 dsuc(Stacks and Queue)
Unit 2 dsuc(Stacks and Queue)Unit 2 dsuc(Stacks and Queue)
Unit 2 dsuc(Stacks and Queue)
 
Unit 1 dsuc
Unit 1 dsucUnit 1 dsuc
Unit 1 dsuc
 

Último

Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 

Último (20)

Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 

Unit 1 dbms

  • 1. UNIT - 1 INTRODUCTION By: Ms. SWETA SINGH Assistant Professor(CSE)
  • 2. What is Database? • The database is a collection of inter-related data which is used to retrieve, insert and delete the data efficiently. It is also used to organize the data in the form of a table, schema, views, and reports, etc. • For example: The college Database organizes the data about the admin, staff, students and faculty etc. • Using the database, you can easily retrieve, insert, and delete the information.
  • 3. Database Management System • Database management system is a software which is used to manage the database. For example: MySQL, Oracle, etc are a very popular commercial database which is used in different applications. • DBMS provides an interface to perform various operations like database creation, storing data in it, updating data, creating a table in the database and a lot more. • It provides protection and security to the database. In the case of multiple users, it also maintains data consistency. • DBMS allows users the following tasks: • Data Definition: It is used for creation, modification, and removal of definition that defines the organization of data in the database. • Data Updation: It is used for the insertion, modification, and deletion of the actual data in the database. • Data Retrieval: It is used to retrieve the data from the database which can be used by applications for various purposes. • User Administration: It is used for registering and monitoring users, maintain data integrity, enforcing data security, dealing with concurrency control, monitoring performance and recovering information corrupted by unexpected failure.
  • 4. Characteristics of DBMS • It uses a digital repository established on a server to store and manage the information. • It can provide a clear and logical view of the process that manipulates data. • DBMS contains automatic backup and recovery procedures. • It contains ACID properties which maintain data in a healthy state in case of failure. • It can reduce the complex relationship between data. • It is used to support manipulation and processing of data. • It is used to provide security of data. • It can view the database from different viewpoints according to the requirements of the user.
  • 5. Advantages of DBMS • Controls database redundancy: It can control data redundancy because it stores all the data in one single database file and that recorded data is placed in the database. • Data sharing: In DBMS, the authorized users of an organization can share the data among multiple users. • Easily Maintenance: It can be easily maintainable due to the centralized nature of the database system. • Reduce time: It reduces development time and maintenance need. • Backup: It provides backup and recovery subsystems which create automatic backup of data from hardware and software failures and restores the data if required. • Multiple user interface: It provides different types of user interfaces like graphical user interfaces, application program interfaces
  • 6. Disadvantages of DBMS • Cost of Hardware and Software: It requires a high speed of data processor and large memory size to run DBMS software. • Size: It occupies a large space of disks and large memory to run them efficiently. • Complexity: Database system creates additional complexity and requirements. • Higher impact of failure: Failure is highly impacted the database because in most of the organization, all the data stored in a single database and if the database is damaged due to electric failure or database corruption then the data may be lost forever.
  • 7. DBMS Architecture • The DBMS design depends upon its architecture. The basic client/server architecture is used to deal with a large number of PCs, web servers, database servers and other components that are connected with networks. • The client/server architecture consists of many PCs and a workstation which are connected via the network. • DBMS architecture depends upon how users are connected to the database to get their request done.
  • 8. Types of DBMS Architecture
  • 9. Types of DBMS Architecture  1-Tier Architecture • In this architecture, the database is directly available to the user. It means the user can directly sit on the DBMS and uses it. • Any changes done here will directly be done on the database itself. It doesn't provide a handy tool for end users. • The 1-Tier architecture is used for development of the local application, where programmers can directly communicate with the database for the quick response.  2-Tier Architecture • The 2-Tier architecture is same as basic client-server. In the two-tier architecture, applications on the client end can directly communicate with the database at the server side. For this interaction, API's like: ODBC, JDBC are used. • The user interfaces and application programs are run on the client-side. • The server side is responsible to provide the functionalities like: query processing and transaction management. • To communicate with the DBMS, client-side application establishes a connection with the server side.
  • 11. 3-Tier Architecture • The 3-Tier architecture contains another layer between the client and server. In this architecture, client can't directly communicate with the server. • The application on the client-end interacts with an application server which further communicates with the database system. • End user has no idea about the existence of the database beyond the application server. The database also has no idea about any other user beyond the application. • The 3-Tier architecture is used in case of large web application.
  • 13. Three schema Architecture • The three schema architecture is also called ANSI/SPARC architecture or three-level architecture. • This framework is used to describe the structure of a specific database system. • The three schema architecture is also used to separate the user applications and physical database. • The three schema architecture contains three- levels. It breaks the database down into three different categories.
  • 15. Data Models • Data Model is the modeling of the data description, data semantics, and consistency constraints of the data. • It provides the conceptual tools for describing the design of a database at each level of data abstraction
  • 16. Data Models • 1) Relational Data Model: This type of model designs the data in the form of rows and columns within a table. Thus, a relational model uses tables for representing data and in-between relationships. Tables are also called relations. This model was initially described by Edgar F. Codd, in 1969. • 2) Entity-Relationship Data Model: An ER model is the logical representation of data as objects and relationships among them. These objects are known as entities, and relationship is an association among these entities. This model was designed by Peter Chen and published in 1976 papers. It was widely used in database designing.
  • 17. • 3) Object-based Data Model: An extension of the ER model with notions of functions, encapsulation, and object identity, as well. This model supports a rich type system that includes structured and collection types. Thus, in 1980s, various database systems following the object- oriented approach were developed. Here, the objects are nothing but the data carrying its properties. • 4) Semistructured Data Model: This type of data model is different from the other three data models (explained above). The semistructured data model allows the data specifications at places where the individual data items of the same type may have different attributes sets.
  • 18. Data model Schema and Instance • The data which is stored in the database at a particular moment of time is called an instance of the database. • The overall design of a database is called schema. • A database schema is the skeleton structure of the database. It represents the logical view of the entire database. • A schema contains schema objects like table, foreign key, primary key, views, columns, data types, stored procedure, etc. • A database schema can be represented by using the visual diagram. That diagram shows the database objects and relationship with each other. • A database schema is designed by the database designers to help programmers whose software will interact with the database. The process of database creation is called data modeling.
  • 19. Data Independence • Data independence can be explained using the three-schema architecture. • Data independence refers characteristic of being able to modify the schema at one level of the database system without altering the schema at the next higher level. • There are two types of data independence: 1. Logical Data Independence • Logical data independence refers characteristic of being able to change the conceptual schema without having to change the external schema. • Logical data independence is used to separate the external level from the conceptual view. • If we do any changes in the conceptual view of the data, then the user view of the data would not be affected. • Logical data independence occurs at the user interface level. 2. Physical Data Independence • Physical data independence can be defined as the capacity to change the internal schema without having to change the conceptual schema. • If we do any changes in the storage size of the database system server, then the Conceptual structure of the database will not be affected. • Physical data independence is used to separate conceptual levels from the internal levels. • Physical data independence occurs at the logical interface level.
  • 21. Database Language • A DBMS has appropriate languages and interfaces to express database queries and updates. • Database languages can be used to read, store and update the data in the database. • Types of Database Language
  • 22. Keys • Keys play an important role in the relational database. • It is used to uniquely identify any record or row of data from the table. It is also used to establish and identify relationships between tables. • For example: In Student table, ID is used as a key because it is unique for each student. In PERSON table, passport_number, license_number, SSN are keys since they are unique for each person. •
  • 23. Types of key: 1. Primary key •It is the first key which is used to identify one and only one instance of an entity uniquely. An entity can contain multiple keys as we saw in PERSON table. The key which is most suitable from those lists become a primary key. •In the EMPLOYEE table, ID can be primary key since it is unique for each employee. In the EMPLOYEE table, we can even select License_Number and Passport_Number as primary key since they are also unique. •For each entity, selection of the primary key is based on requirement and developers.
  • 24. 2. Candidate key • A candidate key is an attribute or set of an attribute which can uniquely identify a tuple. • The remaining attributes except for primary key are considered as a candidate key. The candidate keys are as strong as the primary key. • For example: In the EMPLOYEE table, id is best suited for the primary key. Rest of the attributes like SSN, Passport_Number, and License_Number, etc. are considered as a candidate key.
  • 25. 3. Super Key • Super key is a set of an attribute which can uniquely identify a tuple. Super key is a superset of a candidate key. • For example: In the above EMPLOYEE table, for(EMPLOEE_ID, EMPLOYEE_NAME) the name of two employees can be the same, but their EMPLYEE_ID can't be the same. Hence, this combination can also be a key. • The super key would be EMPLOYEE-ID, (EMPLOYEE_ID, EMPLOYEE-NAME), etc.
  • 26. 4. Foreign key • Foreign keys are the column of the table which is used to point to the primary key of another table. • In a company, every employee works in a specific department, and employee and department are two different entities. So we can't store the information of the department in the employee table. That's why we link these two tables through the primary key of one table. • We add the primary key of the DEPARTMENT table, Department_Id as a new attribute in the EMPLOYEE table. • Now in the EMPLOYEE table, Department_Id is the foreign key, and both the tables are related.
  • 27. Generalization • Generalization is like a bottom-up approach in which two or more entities of lower level combine to form a higher level entity if they have some attributes in common. • In generalization, an entity of a higher level can also combine with the entities of the lower level to form a further higher level entity. • Generalization is more like subclass and superclass system, but the only difference is the approach. Generalization uses the bottom-up approach.
  • 28. Specialization • Specialization is a top-down approach, and it is opposite to Generalization. In specialization, one higher level entity can be broken down into two lower level entities. • Specialization is used to identify the subset of an entity set that shares some distinguishing characteristics. • Normally, the superclass is defined first, the subclass and its related attributes are defined next, and relationship set are then added. • For example: In an Employee management system, EMPLOYEE entity can be specialized as TESTER or DEVELOPER based on what role they play in the company. •
  • 29. Aggregation • In aggregation, the relation between two entities is treated as a single entity. In aggregation, relationship with its corresponding entities is aggregated into a higher level entity. • For example: Center entity offers the Course entity act as a single entity in the relationship which is in a relationship with another entity visitor. In the real world, if a visitor visits a coaching center then he will never enquiry about the Course only or just about the Center instead he will ask the enquiry about both.
  • 30. Reduction of ER diagram to Table • The database can be represented using the notations, and these notations can be reduced to a collection of tables. • In the database, every entity set or relationship set can be represented in tabular form.The ER diagram is given below:
  • 31. Structure of Database Management System
  • 32. • Defining the information. • Storing the information. • Manipulating the information. • Protecting the information from system crashes or data theft. • Differentiating access permissions for different users. The database system is divided into three components: Query Processor, Storage Manager, and Disk Storage. These are explained as following below.
  • 33. 1. Query Processor : • It interprets the requests (queries) received from end user via an application program into instructions. It also executes the user request which is received from the DML compiler. Query Processor contains the following components – • DML Compiler – It processes the DML statements into low level instruction (machine language), so that they can be executed. • DDL Interpreter – It processes the DDL statements into a set of table containing meta data (data about data). • Embedded DML Pre-compiler – It processes DML statements embedded in an application program into procedural calls. • Query Optimizer – It executes the instruction generated by DML Compiler.
  • 34. 2. Storage Manager : • Storage Manager is a program that provides an interface between the data stored in the database and the queries received. • It is also known as Database Control System. • It maintains the consistency and integrity of the database by applying the constraints and executes the DCL statements. • It is responsible for updating, storing, deleting, and retrieving data in the database. It contains the following components – • Authorization Manager – It ensures role-based access control, i.e,. checks whether the particular person is privileged to perform the requested operation or not. • Integrity Manager – It checks the integrity constraints when the database is modified.
  • 35. 2. Storage Manager : • Transaction Manager – It controls concurrent access by performing the operations in a scheduled way that it receives the transaction. Thus, it ensures that the database remains in the consistent state before and after the execution of a transaction. • File Manager – It manages the file space and the data structure used to represent information in the database. • Buffer Manager – It is responsible for cache memory and the transfer of data between the secondary storage and main memory.
  • 36. 3. Disk Storage : • It contains the following components – • Data Files – It stores the data. • Data Dictionary – It contains the information about the structure of any database object. It is the repository of information that governs the metadata. • Indices – It provides faster retrieval of data item. •
  • 37. Extended Entity-Relationship (EE-R) Model • EER is a high-level data model that incorporates the extensions to the original ER model. Enhanced ERD are high level models that represent the requirements and complexities of complex database. • In addition to ER model concepts EE-R includes − • Subclasses and Super classes. • Specialization and Generalization. • Category or union type. • Aggregation. • These concepts are used to create EE-R diagrams. • Subclasses and Super class • Super class is an entity that can be divided into further subtype.
  • 38. Extended Entity-Relationship (EE-R) Model Super class shape has sub groups: Triangle, Square and Circle. Sub classes are the group of entities with some unique attributes.Sub class inherits the properties and attributes from super class.