Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
84 views

DBMS Notes

Data is facts and statistics stored over a network that become information when processed into something meaningful. A database is a collection of related organized data that can be easily accessed, managed, and updated, with the goal of storing large amounts of data. A database management system (DBMS) is software that allows creation, definition, and manipulation of databases, providing tools to perform operations like creating databases and tables, storing and updating data, and more.

Uploaded by

Ragav Raj
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
84 views

DBMS Notes

Data is facts and statistics stored over a network that become information when processed into something meaningful. A database is a collection of related organized data that can be easily accessed, managed, and updated, with the goal of storing large amounts of data. A database management system (DBMS) is software that allows creation, definition, and manipulation of databases, providing tools to perform operations like creating databases and tables, storing and updating data, and more.

Uploaded by

Ragav Raj
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

What is Data?

Data is nothing but facts and statistics stored or free flowing over a network, generally it's raw and unprocessed.
For example: When you visit any website, they might store you IP address, that is data, in return they might add a
cookie in your browser, marking you that you visited the website, that is data, your name, it's data, your age, it's
data.
Data becomes information when it is processed, turning it into something meaningful. Like, based on the cookie
data saved on user's browser, if a website can analyse that generally men of age 20-25 visit us more, that is
information, derived from the data collected.

What is a Database?
A Database is a collection of related data organized in a way that data can be easily accessed, managed and updated.
Database can be software based or hardware based, with one sole purpose, storing data.
During early computer days, data was collected and stored on tapes, which were mostly write-only, which means once data
is stored on it, it can never be read again. They were slow and bulky, and soon computer scientists realised that they needed
a better solution to this problem.
Larry Ellison, the co-founder of Oracle was amongst the first few, who realised the need for a software based
Database Management System.

What is Database?
Database is the collection of organized data that is structured and stored electronically on a computer system.
Databases can store data in the form of tables depending upon the type of database. The database's primary goal is
to store a huge amount of data.
Examples of some databases: MySQL, Oracle, MongoDB, PostgreSQL, SQL Server, etc.

What is DBMS?
A DBMS is a software that allows creation, definition and manipulation of database, allowing users to store, process
and analyse data easily. DBMS provides us with an interface or a tool, to perform various operations like creating
database, storing data in it, updating data, creating tables in the database and a lot more.
DBMS also provides protection and security to the databases. It also maintains data consistency in case of multiple
users. Here are some examples of popular DBMS used these days:
• MySql
• Oracle
• SQL Server
• IBM DB2
• PostgreSQL
• Amazon SimpleDB (cloud based) etc.

Why Use a Database?


There are some points by which we can say that we should use a database for managing our data:
• Databases are able to store vast numbers of records in an effective manner.
• It is incredibly simple and quick to locate data.
• It's simple to add new data and modify or delete available data.
• Data can be easily searched in a database using techniques like indexing, binary searching, etc.
• Data can be quickly and easily sorted in a database.
• Data can be imported into other applications easily.
• Database is Multi-access means that more than one person can use the same database at the same time.
• The security of data in the database is more than that of physical paper files because the database provides
additional security patterns for authorized access.
• Databases are also used for transaction management. Transactions are some set of programs used for some logical
word, databases are used to maintain consistency and accuracy during the transactions.
What is Database Management System (DBMS)?
A database management system is software that manages a database by storing, retrieving, and manipulating the data
from a database. Oracle, MySQL, etc are well-known DBMS tools.
Some functions of a Database Management System are:
• A database management system (DBMS) provides an interface for performing various activities such as
creation, deletion, and modification of the data.
• A database management system (DBMS) allows users to design databases that meet their specific needs.
• A database management system (DBMS) is a collection of programs that respond to user commands.
• It ensures the database's safety by providing security patterns like password protection and verification to
ensure access to only authorized users.
• It can be easily used using the queries.

Components of Database
There are five components into which a database is divided. Each component has a prominent role and a specific
task in a DBMS environment:
• Hardware: It is the physical, electronic devices such as I/O devices, computers, and storage discs
that provide the interface between computers and real-world systems. Hardware includes the data servers
that are used to store the data of the databases. Hardware is the physical storage device used to store the data
for the databases.
• Software: Software is the set of programs that controls and manages the database. This includes
the Database Management System software, the Operating System, the network software used to exchange
data, and the software applications used to access the data in the DBMS. This software is built over
Hardware devices to integrate with hardware servers and DBMS software to manage all data transactions.
• Data: Data is the raw information that has been processed and translated into other forms or means. Data
can be texts or numbers, or bytes and bits inside the memory of electronic devices. Data is the primary
information stored in the database hardware and flows front-end to hardware using the software.
• Procedures: These are the rules and regulations that guide the users about using a database and how to
create and run the database using defined procedures. Procedures are like a manual for users to manage the
database, for example, stored procedures.
• Database Access Language: Database Access Language (DAL) is a programming language for reading,
updating, and deleting data from a database. Users can create new databases, and tables, add attributes and
rows, insert data, and delete data using the language. It is usually the query language that manages the
database and makes changes in it, exp SQL.

Advantages of DBMS
• DBMS offers a variety of techniques to store & retrieve data
• DBMS serves as an efficient handler to balance the needs of multiple applications using the same data
• Uniform administration procedures for data
• Application programmers are never exposed to details of data representation and storage.
• A DBMS uses various powerful functions to store and retrieve data efficiently.
• Offers Data Integrity and Security
• The DBMS implies integrity constraints to get a high level of protection against prohibited access to data.
• A DBMS schedules concurrent access to the data in such a manner that only one user can access the same
data at a time
• Reduced Application Development Time
Disadvantage of DBMS
DBMS may offer plenty of advantages, but it has certain flaws-
• The cost of Hardware and Software of a DBMS is quite high, which increases the budget of your
organization.
• Most database management systems are often complex, so training users to use the DBMS is required.
• In some organizations, all data is integrated into a single database that can be damaged because of electric
failure or corruption in the storage media.
• Using the same program at a time by multiple users sometimes leads to data loss.

• DBMS can’t perform sophisticated calculations


Application of DBMS
Below are the popular database system applications:
Sector Use of DBMS
Banking For customer information, account activities, payments, deposits, loans, etc.
Airlines For reservations and schedule information.
Universities For student information, course registrations, colleges, and grades.
Telecommunication It helps to keep call records, monthly bills, maintain balances, etc.
For storing information about stock, sales, and purchases of financial instruments like stocks and
Finance
bonds.
Sales Use for storing customer, product & sales information.
It is used to manage the supply chain and track the production of items. Inventories status in
Manufacturing
warehouses.
HR Management For information about employees, salaries, payroll, deduction, generation of paychecks, etc.
Library It becomes difficult to keep track of thousands of books and the members in the physical register.
Management So DBMS is used to make it easy. With the help of DBMS, we can store data with different book
categories, authors and genres.
Millions of users use social media sites every day and tons of data is shared between them. This
Social Media Sites
huge amount of data is managed and stored with the help of DBMS.

Characteristics of Database Management System


A database management system has following characteristics:
1. Data stored into Tables: Data is never directly stored into the database. Data is stored into tables, created
inside the database. DBMS also allows to have relationships between tables which makes the data more
meaningful and connected. You can easily understand what type of data is stored where by looking at all
the tables created in a database.
2. Reduced Redundancy: In the modern world hard drives are very cheap, but earlier when hard drives
were too expensive, unnecessary repetition of data in database was a big problem. But DBMS follows
Normalization which divides the data in such a way that repetition is minimum.
3. Data Consistency: On Live data, i.e. data that is being continuosly updated and added, maintaining the
consistency of data can become a challenge. But DBMS handles it all by itself.
4. Support Multiple user and Concurrent Access: DBMS allows multiple users to work on it(update,
insert, delete data) at the same time and still manages to maintain the data consistency.
5. Query Language: DBMS provides users with a simple Query language, using which data can be easily
fetched, inserted, deleted and updated in a database.
6. Security: The DBMS also takes care of the security of data, protecting the data from un-authorised
access. In a typical DBMS, we can create user accounts with different access permissions, using which we
can easily secure our data by restricting user access.
7. DBMS supports transactions, which allows us to better handle and manage data integrity in real world
applications where multi-threading is extensively used.
History of DBMS
Here, are the important landmarks from the history of DBMS:
• 1960 – Charles Bachman designed the first DBMS system
• 1970 – Codd introduced IBM’S Information Management System (IMS)
• 1976- Peter Chen coined and defined the Entity-relationship model, also known 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.
Users of DBMS
Following are the various category of users of DBMS
• Database Administrators: Database Administrator or DBA is the one who manages the complete database
management system. DBA takes care of the security of the DBMS, it's availability, managing the license
keys, managing user accounts and access etc.
• Application Programmer or Software Developer: This user group is involved in developing and desiging
the parts of DBMS.
• End User: These days all the modern applications, web or mobile, store user data. How do you think they
do it? Yes, applications are programmed in such a way that they collect user data and store the data on
DBMS systems running on their server. End users are the one who store, retrieve, update and delete data.
File-Based Databases
File-Based databases were first developed in 1968. Data was stored as a flat-file in file-based databases. It is the most simple
storage technique with less security and management. Examples: Microsoft's NTFS, Apple's Hierarchical File System.
File System v/s DBMS
Parameters DBMS File System
DBMS is a collection of data and set of programs to File system is an abstraction to store, retrieve and
Meaning
access those data. update a set of files.
Data
Repetition of data can be reduced. Repetition of data cannot be reduced.
Redundancy
Data
Inconsistency of data can be avoided. Inconsistency of data cannot be avoided.
Inconsistency
Data
Inconsistency of data can be avoided. Inconsistency of data cannot be avoided.
Inconsistency
Data cannot be shared easily. There is difficulty in
Sharing of Data Data can be shared easily.
accessing the data.
The data can be accessed from the database through Data independence cannot be provided to access
Data Integrity
physically as well as logically. the data.
Response to It gives fast response to information request because
It gives slow response to information request.
Request the data are integrated into a single database.
Security It restricts unauthorized access. Lack of security.
Concurrency Data can be accessed by multiple users at same point
Problem in concurrency control.
Control of time.
It provides back up of data and restores the database It does not provide back up and data recovery.
Data Recovery
to its original state after database failure. The data may loss if the operation is failed.
Types of DBMS

Types of DBMS
The main Four Types of Database Management Systems are:
• Hierarchical database
• Network database
• Relational database
• Object-Oriented database
Hierarchical DBMS
In a Hierarchical database, model data is organized in a tree-like structure. Data is Stored Hierarchically (top-
down or bottom-up) format. Data is represented using a parent-child relationship. In Hierarchical DBMS,
parents may have many children, but children have only one parent.
Network Model
The network database model allows each child to have multiple parents. It helps you to address the need to model
more complex relationships like the orders/parts many-to-many relationship. In this model, entities are organized
in a graph which can be accessed through several paths.
Relational Model
Relational DBMS is the most widely used DBMS model because it is one of the easiest. This model is based on
normalizing data in the rows and columns of the tables. Relational model stored in fixed structures and
manipulated using SQL.
Object-Oriented Model
In the Object-oriented Model data is stored in the form of objects. The structure is called classes which display
data within it. It is one of the components of DBMS that defines a database as a collection of objects that stores
both data members’ values and operations.
What is Database Architecture?
A Database Architecture is a representation of DBMS design. It helps to design, develop, implement, and
maintain the database management system. A DBMS architecture allows dividing the database system into
individual components that can be independently modified, changed, replaced, and altered. It also helps to
understand the components of a database.
A Database stores critical information and helps access data quickly and securely. Therefore, selecting the correct
Architecture of DBMS helps in easy and efficient data management.
• Types of DBMS Architecture
• 1-Tier Architecture
• 2-Tier Architecture
• 3-Tier Architecture
Types of DBMS Architecture
There are mainly three types of DBMS architecture:
• One Tier Architecture (Single Tier Architecture)
• Two Tier Architecture
• Three Tier Architecture
Now, we will learn about different architecture of DBMS with diagram.
1-Tier Architecture
1 Tier Architecture in DBMS is the simplest architecture of Database in which the client, server, and
Database all reside on the same machine. A simple one tier architecture example would be anytime you install a
Database in your system and access it to practice SQL queries. But such architecture is rarely used in production.
1 Tier Architecture Diagram
2-Tier Architecture
A 2 Tier Architecture in DBMS is a Database architecture where the presentation layer runs on a client (PC,
Mobile, Tablet, etc.), and data is stored on a server called the second tier. Two tier architecture provides added
security to the DBMS as it is not exposed to the end-user directly. It also provides direct and faster communication.

2 Tier Architecture Diagram


In the above 2 Tier client-server architecture of database management system, we can see that one server is
connected with clients 1, 2, and 3. Two Tier Architecture Example:
A Contact Management System created using MS- Access.
3-Tier Architecture
A 3 Tier Architecture in DBMS is the most popular client server architecture in DBMS in which the development
and maintenance of functional processes, logic, data access, data storage, and user interface is done independently
as separate modules. Three Tier architecture contains a presentation layer, an application layer, and a database
server. 3-Tier database Architecture design is an extension of the 2-tier client-server architecture. A 3-tier
architecture has the following layers:
1. Presentation layer (your PC, Tablet, Mobile, etc.)
2. Application layer (server)
3. Database Server

3 Tier Architecture Diagram


The Application layer resides between the user and the DBMS, which is responsible for communicating the user’s
request to the DBMS system and send the response from the DBMS to the user. The application layer(business
logic layer) also processes functional logic, constraint, and rules before passing data to the user or down to the
DBMS.
The goal of Three Tier client-server architecture is:
• To separate the user applications and physical database
• To support DBMS characteristics
• Program-data independence
• Supporting multiple views of the data
Three Tier Architecture Example:
Any large website on the internet.
DBMS Schemas: Internal, Conceptual, External
Database systems comprise of complex data structures. Thus, to make the system efficient for retrieval of data and
reduce the complexity of the users, developers use the method of Data Abstraction.
There are mainly three levels of data abstraction:
1. Internal Level: Actual PHYSICAL storage structure and access paths.
2. Conceptual or Logical Level: Structure and constraints for the entire database
3. External or View level: Describes various user views

Internal Level/Schema
The internal schema defines the physical storage structure of the database. The internal schema is a very low-
level representation of the entire database. It contains multiple occurrences of multiple types of internal record. In
the ANSI term, it is also called “stored record’.
Facts about Internal schema:
• The internal schema is the lowest level of data abstraction
• It helps you to keeps information about the actual representation of the entire database. Like the actual storage of
the data on the disk in the form of records
• The internal view tells us what data is stored in the database and how
• It never deals with the physical devices. Instead, internal schema views a physical device as a collection of physical
pages
Conceptual Schema/Level
The conceptual schema describes the Database structure of the whole database for the community of users.
This schema hides information about the physical storage structures and focuses on describing data types,
entities, relationships, etc.
This logical level comes between the user level and physical storage view. However, there is only single
conceptual view of a single database.
Facts about Conceptual schema:
• Defines all database entities, their attributes, and their relationships
• Security and integrity information
• In the conceptual level, the data available to a user must be contained in or derivable from the physical level

External Schema/Level
An external schema describes the part of the database which specific user is interested in. It hides the
unrelated details of the database from the user. There may be “n” number of external views for each database.
Each external view is defined using an external schema, which consists of definitions of various types of external
record of that specific view.
An external view is just the content of the database as it is seen by some specific particular user. For example, a
user from the sales department will see only sales related data.
Facts about external schema:
• An external level is only related to the data which is viewed by specific end users.
• This level includes some external schemas.
• External schema level is nearest to the user
• The external schema describes the segment of the database which is needed for a certain user group and hides
the remaining details from the database from the specific user group

Goal of 3 level/schema of Database


Here, are some Objectives of using Three schema Architecture:
• Every user should be able to access the same data but able to see a customized view of the data.
• The user need not to deal directly with physical database storage detail.
• The DBA should be able to change the database storage structure without disturbing the user’s views
• The internal structure of the database should remain unaffected when changes made to the physical aspects of
storage.
Advantages Database Schema
• You can manage data independent of the physical storage
• Faster Migration to new graphical environments
• DBMS Architecture allows you to make changes on the presentation level without affecting the other two layers
• As each tier is separate, it is possible to use different sets of developers
• It is more secure as the client doesn’t have direct access to the database business logic
• In case of the failure of the one-tier no data loss as you are always secure by accessing the other tier

Disadvantages Database Schema


• Complete DB Schema is a complex structure which is difficult to understand for every one
• Difficult to set up and maintain
• The physical separation of the tiers can affect the performance of the Database

Three Level Architecture of DBMS


Following are the three levels of database architecture,

1. Physical Level
2. Conceptual Level
3. External Level
In the above diagram,

• It shows the architecture of DBMS.


• Mapping is the process of transforming request response between various database levels of architecture.
• Mapping is not good for small database, because it takes more time.
• In External / Conceptual mapping, DBMS transforms a request on an external schema against the
conceptual schema.
• In Conceptual / Internal mapping, it is necessary to transform the request from the conceptual to internal
levels.

1. Physical Level

• Physical level describes the physical storage structure of data in database.


• It is also known as Internal Level.
• This level is very close to physical storage of data.
• At lowest level, it is stored in the form of bits with the physical addresses on the secondary storage device.
• At highest level, it can be viewed in the form of files.
• The internal schema defines the various stored data types. It uses a physical data model.

2. Conceptual Level

• Conceptual level describes the structure of the whole database for a group of users.
• It is also called as the data model.
• Conceptual schema is a representation of the entire content of the database.
• These schema contains all the information to build relevant external records.
• It hides the internal details of physical storage.

3. External Level

• External level is related to the data which is viewed by individual end users.
• This level includes a no. of user views or external schemas.
• This level is closest to the user.
• External view describes the segment of the database that is required for a particular user group and hides
the rest of the database from that user group.

You might also like