Data Managment Unit 3 concept of dbms
Data Managment Unit 3 concept of dbms
FYBCA - DBMS
❖ 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.
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.
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
❖ 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
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
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.
1
1
RED & WHITE INSTITUTE OF ENGINEERING & TECHNOLOGY
FYBCA - DBMS
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
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
○ It develops a conceptual design for the database. It also develops a very simple
and easy to design view of data.
1
5
RED & WHITE INSTITUTE OF ENGINEERING & TECHNOLOGY
FYBCA - DBMS
➢ Concept of ER Diagram
1
6
RED & WHITE INSTITUTE OF ENGINEERING & TECHNOLOGY
FYBCA - DBMS
1
7
RED & WHITE INSTITUTE OF ENGINEERING & TECHNOLOGY
FYBCA - DBMS
1. Entity:
An entity may be any object, class, person or place. In the ER diagram, an entity can be
represented as rectangles.
➢ 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
➢ Types of Attributes:-
a. Key Attribute b. Composite Attribute
a. Key Attribute
1
9
RED & WHITE INSTITUTE OF ENGINEERING & TECHNOLOGY
FYBCA - DBMS
b. Composite Attribute
c. Multivaued Attribute
d. Derived Attribute
2
0
RED & WHITE INSTITUTE OF ENGINEERING & TECHNOLOGY
FYBCA - DBMS
2
1
RED & WHITE INSTITUTE OF ENGINEERING & TECHNOLOGY
FYBCA - DBMS
3. Relationship
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
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.
➔ 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
➔ 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