0% found this document useful (0 votes)
13 views29 pages

Data Managment Unit 3 concept of dbms

Uploaded by

kirtanjaviya102
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
13 views29 pages

Data Managment Unit 3 concept of dbms

Uploaded by

kirtanjaviya102
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 29

RED & WHITE INSTITUTE OF ENGINEERING & TECHNOLOGY

FYBCA - DBMS

UNIT 3 – CONCEPT OF DATABASE MANAGEMENT SYSTEM

❖ 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 software that is used to manage the
database.
● Database man
● agement 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.
➢ 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 manresponseta.
● DBMS contains automatic backup and recovery procedures.
● It contains ACID properties which maintain data in a healthy state in case of
failure.(Atomicity,Consistency,Isolation,Durability)
● 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.

1
RED & WHITE INSTITUTE OF ENGINEERING & TECHNOLOGY
FYBCA - DBMS

❖ 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 natureof
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.

1
RED & WHITE INSTITUTE OF ENGINEERING & TECHNOLOGY
FYBCA - DBMS

Components of DBMS:
There are the following components of DBMS:

1. Software
2
RED & WHITE INSTITUTE OF ENGINEERING & TECHNOLOGY
2. Hardware FYBCA - DBMS
3. Procedures
4. Data
5. Users

1.Software
● The main component of a Database Management System is the software. It is
the set of programs that are used to manage the database and control the
overall computerized database.
● The DBMS software provides an easy-to-use interface to store, retrieve, and
update data in the database.
● This software component is capable of understanding the Database Access
Language and converts it into actual database commands to execute or run them
on the database.

2.Hardware
● This component of DBMS consists of a set of physical electronic devices
such as computers, I/O channels, storage devices, etc that create an
interface between computers and the users.
● This DBMS component is used for keeping and storing the data in the database.

3
RED & WHITE INSTITUTE OF ENGINEERING & TECHNOLOGY
FYBCA - DBMS

3. Procedures
● Procedures refer to general rules and instructions that help to design
thedatabase and to use a database management system.
● Procedures are used to setup and install a new database management
system(DBMS), to login and logout of DBMS software, to manage DBMS or
applicationprograms, to take backup of the database, and to change the
structure of the database, etc.

4.Data
● It is the most important component of the database management system.
● The main task of DBMS is to process the data. Here, databases are
defined,constructed, and then data is stored, retrieved, and updated to
and from the databases.
● The database contains both the metadata (description about data or
dataabout data) and the actual (or operational) data.

5.Users
● The users are the people who control and manage the databases and
performdifferent types of operations on the databases in the database
management system.

□ Three types of users play different roles in DBMS:


1) Application Programmers
2) Database Administrators
3) End-Users
1. Application Programmers

The users who write the application programs in programming languages


(such as Java, C++, or Visual Basic) to interact with databases are called
ApplicationProgrammers.

2. Database Administrators (DBA)


A person who manages the overall DBMS is called a database administrator
orsimply DBA.
4
RED & WHITE INSTITUTE OF ENGINEERING & TECHNOLOGY
FYBCA - DBMS

3. End-Users
The end-users are those who interact with the database management system toperform different
operations by using the different database commands such asinsert, update, retrieve, and delete on
the data, etc.

❖ 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.

5
RED & WHITE INSTITUTE OF ENGINEERING & TECHNOLOGY
FYBCA - DBMS

➢ 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 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.

6
RED & WHITE INSTITUTE OF ENGINEERING & TECHNOLOGY
FYBCA - DBMS

❖ 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.

7
RED & WHITE INSTITUTE OF ENGINEERING & TECHNOLOGY
FYBCA - DBMS

❖ Drawbacks / Pitfalls of Conventional File


Processing System Over DBMS
There are some disadvantages of File Processing system, which are as mentioned below.

1. Data Redundancy : Data redundancy means, the same information is repeated in


several files. For example, a name of a person, address and telephone number of a
particular customer appears in all accounts viz. Saving’s Bank Account, Current Account,
Recurring Deposit Account and Loan Accounts etc. in a Bank.

2. Data Inconsistency: Data Inconsistency arises, when there is Data Redundancy. It


means, the various copies of the same data in different files is not get updated when
changes are made once. Thus the required information cannot get by an Application
programs because there is no such programs in the list of Application Programs or the
fields of the file may vary at the time of Application Design.

3. Data Isolation: The data is scattered in various files with different formats. Therefore,
it is difficult to write a new application program and hence difficult to retrieve appropriate
data from the files.

4. Integrity Problems: The data values stored in a file must be satisfied with certain data
integrity constraints. The programmers need to provide integrity constraints and data
must be validated from time to time. It is having limitations in the file system.
5.Concurrent Access: The system requires to allow multiple users to access and update
the data simultaneously, instead of a Single user system. The interaction with
concurrency may result inconsistency.

6. Security Problems: The system should not give access to the unauthorized users
to operate as the data is important and sensitive data. It should allow only some of the
users who have given privileges to access and manipulate data.

NEED OF DBMS
A Data Base Management System is a system software for easy, efficient and
reliable data processing and management. It can be used for:
● Creation of a database.
● Retrieval of information from the database.
● Updating the database.
● Managing a database.

8
RED & WHITE INSTITUTE OF ENGINEERING & TECHNOLOGY
FYBCA - DBMS

1) Processing Queries and Object Management:


● In traditional file systems, we cannot store data in the form of objects. In
practical-world applications, data is stored in objects and not files.
● We can directly store data in the form of objects in a database management
system.
● Application level code needs to be written to handle, store and scan through the
data in a file system whereas a DBMS gives us the ability to query the database
2) Controlling redundancy and inconsistency:
● Redundancy refers to repeated instances of the same data.
● A database system provides redundancy control whereas in a file system, same
data may be stored multiple times.
● A DBMS uses data normalization to avoid redundancy and duplicates.
3) Efficient memory management and indexing:
● DBMS makes complex memory management easy to handle.
● In file systems, files are indexed in place of objects so query operations require
entire file scans whereas in a DBMS , object indexing takes place efficiently
through database schema based on any attribute of the data or a data-property.
This helps in fast retrieval of data based on the indexed attribute.
4) Concurrency control and transaction management:
● Several applications allow user to simultaneously access data. This may lead to
inconsistency in data in case files are used.
● A DBMS implements ACID(atomicity, durability, isolation,consistency) properties
to ensure efficient transaction management without data corruption.
5) Access Control and ease in accessing data:
● A DBMS can grant access to various users and determine which part and how
much of the data can they access from the database thus removing redundancy.
● In case of DBMS, it provides easy access of data through queries, (e.g.,
SELECT queries) and whole logic need not be rewritten. Users can specify
exactly what they want to extract out of the data.
6) Integrity constraints:
● Data stored in databases must satisfy integrity constraints.
● For example, Consider a database schema consisting of the various educational
programs offered by a university such as(B.Tech/M.Tech/B.Sc/M.Sc/BCA/MCA)
etc.
● A DBMS ensures that it is only out of one of the programs offered schema , that
the student is enrolled in, i.e. Not anything out of the blue. Hence, database
integrity is preserved.

9
RED & WHITE INSTITUTE OF ENGINEERING & TECHNOLOGY
FYBCA - DBMS

➢ History of dbms
Here, are the important landmarks from the history:
➔ 1960 - charles bachman designed first dbms system
➔ 1970 - codd introduced ibm's information management system (ims)
➔ 1976- peter chen coined and defined the entity-relationship model also
know as the er model
➔ 1980 - relational model becomes a widely accepted database component
➔ 1985- object-oriented dbms develops.
➔ 1990s- incorporation of object-orientation in relational dbms.
➔ 1991- microsoft ships ms access, a personal dbms and that displaces all
other personal dbms products.
➔ 1995: first internet database applications
➔ 1997: xml applied to database processing. Many vendors begin to
integrate xml into dbms Products.
❖ Why use Data Model?
The primary goal of using data model are:
● Ensures that all data objects required by the database are accurately
represented. Omission of data will lead to creation of faulty reports and
produce incorrect results.
● A data model helps design the database at the conceptual, physical and
logical levels.
➢ Organization of Database in DBMS
Types of Data Models: There are mainly three different types of data models:
conceptual data models, logical data models, and physical data models, and each
one has a specific purpose. The data models are used to represent the data and
how it is stored in the database and to set the relationship between data items.
1. Conceptual Data Model: This Data Model defines WHAT the system
contains. This model is typically created by Business stakeholders and Data
Architects. The purpose is to organize, scope and define business concepts
and rules.
2. Logical Data Model: Defines HOW the system should be implemented
regardless of the DBMS. This model is typically created by Data Architects
and Business Analysts. The purpose is to developed technical map of
rules and data structures.

1
0
RED & WHITE INSTITUTE OF ENGINEERING & TECHNOLOGY
FYBCA - DBMS

3. Physical Data Model: This Data Model describes HOW the system will be
implemented using a specific DBMS system. This model is typically created
by DBA and developers. The purpose is actual implementation of the
database.

❖ Conceptual Data Model


A Conceptual Data Model is an organized view of database concepts and their
relationships. The purpose of creating a conceptual data model is to establish entities,
their attributes, and relationships. In this data modeling level, there is hardly any detail
available on the actual database structure. Business stakeholders and data architects
typically create a conceptual data model.
The 3 basic tenants of Conceptual Data Model are

● Entity: A real-world thing


● Attribute: Characteristics or properties of an entity
● Relationship: Dependency or association between two entities
Data model example:
● Customer and Product are two entities. Customer number and name are
attributes of the Customer entity
● Product name and price are attributes of product entity
● Sale is the relationship between the customer and product

1
1
RED & WHITE INSTITUTE OF ENGINEERING & TECHNOLOGY
FYBCA - DBMS

➢ Characteristics of a conceptual data model


● Offers Organisation-wide coverage of the business concepts.
● This type of Data Models are designed and developed for a business
audience.
● The conceptual model is developed independently of hardware specifications
like data storage capacity, location or software specifications like DBMS
vendor and technology. The focus is to represent data as a user will see it in
the “real world.”
❖ Logical Data Model
The Logical Data Model is used to define the structure of data elements and to set
relationships between them. The logical data model adds further information to the
conceptual data model elements. The advantage of using a Logical data model is to
provide a foundation to form the base for the Physical model. However, the modeling
structure remains generic.

At this Data Modeling level, no primary or secondary key is defined. At this Data
modeling level, you need to verify and adjust the connector details that were set
earlier for relationships.
Characteristics of a Logical data model
● Describes data needs for a single project but could integrate with other logical
data models based on the scope of the project.

1
2
RED & WHITE INSTITUTE OF ENGINEERING & TECHNOLOGY
FYBCA - DBMS

● Designed and developed independently from the DBMS.


● Data attributes will have datatypes with exact precisions and length.
● Normalization processes to the model is applied typically till 3NF.

❖ Physical Data Model


A Physical Data Model describes a database-specific implementation of the data
model. It offers database abstraction and helps generate the schema. This is because
of the richness of meta-data offered by a Physical Data Model. The physical data model
also helps in visualizing database structure by replicating database column keys,
constraints, indexes, triggers, and other RDBMS features.

➢ Characteristics of a physical data model:


● The physical data model describes data need for a single project or
application though it may be integrated with other physical data models based
on project scope.
● Data Model contains relationships between tables that which addresses
cardinality and nullability of the relationships.
● Developed for a specific version of a DBMS, location, data storage or
technology to be used in the project.
● Columns should have exact datatypes, lengths assigned and default values.
● Primary and Foreign keys, views, indexes, access profiles, and
authorizations, etc. are defined.
➢ Advantages and Disadvantages of Data Model:
Advantages of Data model:
● The main goal of a designing data model is to make certain that data objects
offered by the functional team are represented accurately.

1
3
RED & WHITE INSTITUTE OF ENGINEERING & TECHNOLOGY
FYBCA - DBMS

● The data model should be detailed enough to be used for building the
physical database.
● The information in the data model can be used for defining the relationship
between tables, primary and foreign keys, and stored procedures.
● Data Model helps business to communicate the within and across
organizations.
● Data model helps to documents data mappings in ETL process
● Help to recognize correct sources of data to populate the model
Disadvantages of Data model:
● To develop Data model one should know physical data stored characteristics.
● This is a navigational system produces complex application development,
management. Thus, it requires a knowledge of the biographical truth.
● Even smaller change made in structure require modification in the entire
application.
● There is no set data manipulation language in DBMS.
❖ Data Models
A database model is a type of data model that determines the logical
structure of a database and fundamentally determines in which manner
data can be stored, organized and manipulated. The most popular
example of a database model is the relational model, which uses a
table-based format.

1
4
RED & WHITE INSTITUTE OF ENGINEERING & TECHNOLOGY
FYBCA - DBMS

❖ Object based data models: E-R Model


ER (Entity Relationship) Diagram in DBMS

○ ER model stands for an Entity-Relationship model. It is a high-level data model.


This model is used to define the data elements and relationship for a specified
system.

○ It develops a conceptual design for the database. It also develops a very simple
and easy to design view of data.

○ In ER modeling, the database structure is portrayed as a diagram called an


entity-relationship diagram.

○ For example, Suppose we design a school database. In this database, the


student will be an entity with attributes like address, name, id, age, etc. The
address can be another entity with attributes like city, street name, pin code, etc
and there will be a relationship between them.

1
5
RED & WHITE INSTITUTE OF ENGINEERING & TECHNOLOGY
FYBCA - DBMS

➢ Concept of ER Diagram

1
6
RED & WHITE INSTITUTE OF ENGINEERING & TECHNOLOGY
FYBCA - DBMS

➢ Symbols used in ER Diagrams.

❖ Entity-Set and Keys


● Key is an attribute or collection of attributes that uniquely identifies an
entity among entity set.
● For example, the roll_number of a student makes him/her identifiable
among students.

1
7
RED & WHITE INSTITUTE OF ENGINEERING & TECHNOLOGY
FYBCA - DBMS

➔ Super Key − A set of attributes (one or more) that collectively


identifies an entity in an entity set.
➔ Candidate Key − A minimal super key is called a candidate key. An
entity set may have more than one candidate key.
➔ Primary Key − A primary key is one of the candidate keys chosen by
the database designer to uniquely identify the entity set.

1. Entity:

An entity may be any object, class, person or place. In the ER diagram, an entity can be
represented as rectangles.

Consider an organization as an example- manager, product, employee, department etc.


can be taken as an entity.

➢ Weak Entity
An entity that depends on another entity called a weak entity. The weak entity
doesn't contain any key attribute of its own. The weak entity is represented by a
double rectangle.

1
8
RED & WHITE INSTITUTE OF ENGINEERING & TECHNOLOGY
FYBCA - DBMS

2. Attribute

Defination of Attribute

The attribute is used to describe the


property of an entity. Eclipse is used to
represent an attribute.

For example, id, age, contact number,


name, etc. can be attributes of a
student.

➢ Types of Attributes:-
a. Key Attribute b. Composite Attribute

c. Multivalued Attribute d. Derived Attribute

a. Key Attribute

● The key attribute is used to


represent the main
characteristics of an entity. It
represents a primary key.
● The key attribute is
represented by an ellipse with
the text underlined.

1
9
RED & WHITE INSTITUTE OF ENGINEERING & TECHNOLOGY
FYBCA - DBMS

b. Composite Attribute

● An attribute that composed of


many other attributes is known
as a composite attribute.
● The composite attribute is
represented by an ellipse, and
those ellipses are connected with
an ellipse.

c. Multivaued Attribute

● An attribute can have more than


one value. These attributes are
known as a multivalued attribute.
The double oval is used to
represent multivalued attribute.
● For example, a student can have
more than one phone number.

d. Derived Attribute

● An attribute that can be derived


from other attribute is known as
a derived attribute. It can be
represented by a dashed ellipse.
● For example, A person's age
changes over time and can be
derived from another attribute
like Date of birth.

2
0
RED & WHITE INSTITUTE OF ENGINEERING & TECHNOLOGY
FYBCA - DBMS

➢ E-r diagram with multivalued and derived attributes:

2
1
RED & WHITE INSTITUTE OF ENGINEERING & TECHNOLOGY
FYBCA - DBMS

3. Relationship

A relationship is used to describe the relation between entities. Diamond or


rhombus is used to represent the relationship.

➢ Types of relationship are as follows:

a. One-to-One Relationship

b. One-to-many relationship

c. Many-to-one relationship

d. Many-to-many relationship

a. One-to-One Relationship

● When only one instance of an entity is associated with the relationship, then
it is known as one to one relationship.
● For example, A female can marry to one male, and a male can marry to one
female.

b. One-to-many relationship

2
2
RED & WHITE INSTITUTE OF ENGINEERING & TECHNOLOGY
FYBCA - DBMS

● When only one instance of the entity on the left, and more than one instance
of an entity on the right associates with the relationship then this is known
as a one-to-many relationship.
● For example, Scientist can invent many inventions, but the invention is done
by the only specific scientist.

c. Many-to-one relationship

● When more than one instance of the entity on the left, and only one instance
of an entity on the right associates with the relationship then it is known as a
many-to-one relationship.
● For example, Student enrolls for only one course, but a course can have many
students.

d. Many-to-many relationship

● When more than one instance of the entity on the left, and more than one
instance of an entity on the right associates with the relationship then it is
known as a many-to-many relationship.
● For example, Employee can assign by many projects and project can have
many employees.

2
3
RED & WHITE INSTITUTE OF ENGINEERING & TECHNOLOGY
FYBCA - DBMS

❖ Record based data models: network, hierarchical & relational


➢ This database model organises data into a tree-like-structure, with a
single root, to which all the other data is linked.
➢ The heirarchy starts from the Root data, and expands like a tree,
adding child nodes to the parent nodes.
➢ In this model, a child node will only have a single parent node.
➢ This model efficiently describes many real-world relationships like
index of a book, recipes etc.
➢ In hierarchical model, data is organised into tree-like structure with
one one-to-many relationship between two different types of data, for
example, one department can have many courses, many professors
and of-course many students.

2
4
RED & WHITE INSTITUTE OF ENGINEERING & TECHNOLOGY
FYBCA - DBMS

➔ Advantages –
Simplicity, Data Integrity, Data security, Efficiency, Easy availability of
expertise.
➔ Disadvantages –
Complexity, Inflexibility, Lack of Data Independence, Lack of querying
facility, Data Manipulation Language, Lack Of standards.

❖ Network Model
➢ This is an extension of the Hierarchical model. In this model data is
organised more like a graph, and are allowed to have more than one
parent node.
➢ In this database model data is more related as more relationships are
established in this database model. Also, as the data is more related,
hence accessing the data is also easier and fast.
➢ This database model was used to map many-to-many data
relationships.

For Example- Social Media sites like Facebook, Instagram etc.

➔ Advantages –
Simplicity, Data Integrity, Data Independence, Database standards.
➔ Disadvantages –
System Complexity, Lack of structural Independence.

2
5
RED & WHITE INSTITUTE OF ENGINEERING & TECHNOLOGY
FYBCA - DBMS

❖ Relational Data Model :


Relational Data Model uses tables to represent the data and the relationship
among these data. Each table has multiple columns and each column is
identified by a unique name. It is a low-level model.

This model was introduced by E.F Codd in 1970.

➔ Advantages –
Structural Independence, Simplicity, Ease of designing, Implementation,
Ad-Hoc query capability.
➔ Disadvantages –
Hardware Overheads, Ease of design can result in bad design.

2
6
RED & WHITE INSTITUTE OF ENGINEERING & TECHNOLOGY
FYBCA - DBMS

ER Diagram Examples:-

2
7
RED & WHITE INSTITUTE OF ENGINEERING & TECHNOLOGY
FYBCA - DBMS

2
8

You might also like